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 | 5a94972c2db660c9cc5fe5d79ea095af04456a21 (patch) | |
tree | c5968a407194cba5120766750d96971df91cde2f /src/strgen/strgen.cpp | |
parent | 31d283c6c88464837dd57b78f75394367c4d40f7 (diff) | |
download | openttd-5a94972c2db660c9cc5fe5d79ea095af04456a21.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/strgen/strgen.cpp')
-rw-r--r-- | src/strgen/strgen.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/strgen/strgen.cpp b/src/strgen/strgen.cpp index 3057a88f0..1a874cfa8 100644 --- a/src/strgen/strgen.cpp +++ b/src/strgen/strgen.cpp @@ -490,6 +490,7 @@ static const CmdStruct _cmd_structs[] = { {"SKIP", EmitSingleChar, SCC_SKIP, 1, 0}, {"STRING", EmitSingleChar, SCC_STRING, 1, C_CASE}, + {"RAW_STRING", EmitSingleChar, SCC_RAW_STRING_POINTER, 1, 0}, // Numbers {"COMMA", EmitSingleChar, SCC_COMMA, 1, 0}, // Number with comma @@ -717,7 +718,8 @@ static const CmdStruct *TranslateCmdForCompare(const CmdStruct *a) strcmp(a->cmd, "STRING2") == 0 || strcmp(a->cmd, "STRING3") == 0 || strcmp(a->cmd, "STRING4") == 0 || - strcmp(a->cmd, "STRING5") == 0) { + strcmp(a->cmd, "STRING5") == 0 || + strcmp(a->cmd, "RAW_STRING") == 0){ return FindCmd("STRING", 6); } |