diff options
author | rubidium <rubidium@openttd.org> | 2008-07-17 13:47:04 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2008-07-17 13:47:04 +0000 |
commit | ab234cf90cd0b31354fddb9ee1f562a3eb630cdc (patch) | |
tree | c5968a407194cba5120766750d96971df91cde2f /src/settings_gui.cpp | |
parent | c913be73d8dc69910b67f095aa3820ba29e6bf51 (diff) | |
download | openttd-ab234cf90cd0b31354fddb9ee1f562a3eb630cdc.tar.xz |
(svn r13715) -Fix [FS#2129]: C-like strings had to be rebound each time they were printed, otherwise the text could change due to the few number of slots that could be used to bind.
-Codechange: remove all BindCString and related functions and replace it by RAW_STRING which prints the C-string raw pointer that is on the 'print stack'.
Diffstat (limited to 'src/settings_gui.cpp')
-rw-r--r-- | src/settings_gui.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/settings_gui.cpp b/src/settings_gui.cpp index 8489af712..b6ddb4210 100644 --- a/src/settings_gui.cpp +++ b/src/settings_gui.cpp @@ -1115,7 +1115,8 @@ struct CustomCurrencyWindow : Window { if (IsInsideMM(x, 10, 30)) { // clicked button this->click = 1 << (line * 2 + 1); } - str = BindCString(this->separator); + SetDParamStr(0, this->separator); + str = STR_JUST_RAW_STRING; len = 1; break; @@ -1123,7 +1124,8 @@ struct CustomCurrencyWindow : Window { if (IsInsideMM(x, 10, 30)) { // clicked button this->click = 1 << (line * 2 + 1); } - str = BindCString(_custom_currency.prefix); + SetDParamStr(0, _custom_currency.prefix); + str = STR_JUST_RAW_STRING; len = 12; break; @@ -1131,7 +1133,8 @@ struct CustomCurrencyWindow : Window { if (IsInsideMM(x, 10, 30)) { // clicked button this->click = 1 << (line * 2 + 1); } - str = BindCString(_custom_currency.suffix); + SetDParamStr(0, _custom_currency.suffix); + str = STR_JUST_RAW_STRING; len = 12; break; |