summaryrefslogtreecommitdiff
path: root/src/strings.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/strings.cpp')
-rw-r--r--src/strings.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/strings.cpp b/src/strings.cpp
index 6916d2aaa..a82bdd15a 100644
--- a/src/strings.cpp
+++ b/src/strings.cpp
@@ -531,6 +531,12 @@ static char* FormatString(char* buff, const char* str, const int64* argv, uint c
uint modifier = 0;
while ((b = Utf8Consume(&str)) != '\0') {
+ if (SCC_NEWGRF_FIRST <= b && b <= SCC_NEWGRF_LAST) {
+ /* We need to pass some stuff as it might be modified; oh boy. */
+ b = RemapNewGRFStringControlCode(b, &buff, &str, (int64*)argv);
+ if (b == 0) continue;
+ }
+
switch (b) {
case SCC_SETX: // {SETX}
if (buff + Utf8CharLen(SCC_SETX) + 1 < last) {