summaryrefslogtreecommitdiff
path: root/settings_gui.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-08-07 14:18:17 +0000
committertron <tron@openttd.org>2005-08-07 14:18:17 +0000
commit3f39db10d7f3f8fef423647488d29572f755b30e (patch)
tree5a5173c29b038ba89f91183081daaba475f99351 /settings_gui.c
parent14e80ca15968476fffdbc64c5dc5edae9145c0d8 (diff)
downloadopenttd-3f39db10d7f3f8fef423647488d29572f755b30e.tar.xz
(svn r2831) Fix some potential and real buffer overflows
Diffstat (limited to 'settings_gui.c')
-rw-r--r--settings_gui.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/settings_gui.c b/settings_gui.c
index f4e03980b..d1eff6054 100644
--- a/settings_gui.c
+++ b/settings_gui.c
@@ -1319,7 +1319,7 @@ void DrawArrowButtons(int x, int y, int state)
DrawStringCentered(x+15, y+1, STR_681A, 0);
}
-char _str_separator[2];
+static char _str_separator[2];
static void CustCurrencyWndProc(Window *w, WindowEvent *e)
{
@@ -1467,7 +1467,7 @@ static void CustCurrencyWndProc(Window *w, WindowEvent *e)
break;
case 1: /* Thousands seperator */
_custom_currency.separator = (b[0] == '\0') ? ' ' : b[0];
- ttd_strlcpy(_str_separator, b, 16);
+ ttd_strlcpy(_str_separator, b, lengthof(_str_separator));
break;
case 2: /* Currency prefix */
ttd_strlcpy(_custom_currency.prefix, b, lengthof(_custom_currency.prefix));