diff options
author | rubidium42 <rubidium@openttd.org> | 2021-04-27 18:14:44 +0200 |
---|---|---|
committer | rubidium42 <rubidium42@users.noreply.github.com> | 2021-04-27 19:41:51 +0200 |
commit | b54d8a49fb8d635545b2251bfdf41ebee60edc0c (patch) | |
tree | fee346a620a7b5f3c590459eac8cf806c090b0d3 /src/settings_gui.cpp | |
parent | 4880ec29e4649655e775c36cd6bd8c0927d13ee1 (diff) | |
download | openttd-b54d8a49fb8d635545b2251bfdf41ebee60edc0c.tar.xz |
Feature: allow non-ASCII currency separators
Diffstat (limited to 'src/settings_gui.cpp')
-rw-r--r-- | src/settings_gui.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/settings_gui.cpp b/src/settings_gui.cpp index f5872c648..52d900e6e 100644 --- a/src/settings_gui.cpp +++ b/src/settings_gui.cpp @@ -2676,7 +2676,7 @@ struct CustomCurrencyWindow : Window { case WID_CC_SEPARATOR: SetDParamStr(0, _custom_currency.separator); str = STR_JUST_RAW_STRING; - len = 1; + len = sizeof(_custom_currency.separator) - 1; // Number of characters excluding '\0' termination line = WID_CC_SEPARATOR; break; @@ -2684,7 +2684,7 @@ struct CustomCurrencyWindow : Window { case WID_CC_PREFIX: SetDParamStr(0, _custom_currency.prefix); str = STR_JUST_RAW_STRING; - len = 12; + len = sizeof(_custom_currency.prefix) - 1; // Number of characters excluding '\0' termination line = WID_CC_PREFIX; break; @@ -2692,7 +2692,7 @@ struct CustomCurrencyWindow : Window { case WID_CC_SUFFIX: SetDParamStr(0, _custom_currency.suffix); str = STR_JUST_RAW_STRING; - len = 12; + len = sizeof(_custom_currency.suffix) - 1; // Number of characters excluding '\0' termination line = WID_CC_SUFFIX; break; |