summaryrefslogtreecommitdiff
path: root/src/screenshot.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-04-10 20:37:05 +0000
committerrubidium <rubidium@openttd.org>2009-04-10 20:37:05 +0000
commitbee930f9b3b9dad52945c1186227519cf9d566aa (patch)
tree4316044d109b49be7854ac19dd38cbc7d94367c1 /src/screenshot.cpp
parent4bf35086802f6f778e987cf0a4ca377068cb27ed (diff)
downloadopenttd-bee930f9b3b9dad52945c1186227519cf9d566aa.tar.xz
(svn r16024) -Codechange: harden string copying on places where it's possible
Diffstat (limited to 'src/screenshot.cpp')
-rw-r--r--src/screenshot.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/screenshot.cpp b/src/screenshot.cpp
index 01dac79a0..17b18993e 100644
--- a/src/screenshot.cpp
+++ b/src/screenshot.cpp
@@ -456,7 +456,7 @@ const char *GetScreenshotFormatDesc(int i)
void SetScreenshotFormat(int i)
{
_cur_screenshot_format = i;
- strcpy(_screenshot_format_name, _screenshot_formats[i].extension);
+ strecpy(_screenshot_format_name, _screenshot_formats[i].extension, lastof(_screenshot_format_name));
}
/* screenshot generator that dumps the current video buffer */