diff options
author | peter1138 <peter1138@openttd.org> | 2017-04-09 21:58:07 +0000 |
---|---|---|
committer | peter1138 <peter1138@openttd.org> | 2017-04-09 21:58:07 +0000 |
commit | 0d13f793f28a2846ff3f3211c114730f17a21574 (patch) | |
tree | b000b528a6c6829280c57cd38d03aae811223818 | |
parent | 144604a29e7a7d9f0cbcb32a40f4fde54650ecc0 (diff) | |
download | openttd-0d13f793f28a2846ff3f3211c114730f17a21574.tar.xz |
(svn r27851) -Fix [FS#6555]: StringID truncation to 16 bits broke string remapping test.
-rw-r--r-- | src/newgrf_text.cpp | 4 | ||||
-rw-r--r-- | src/newgrf_text.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/newgrf_text.cpp b/src/newgrf_text.cpp index e4b3c382b..eb4b11c5e 100644 --- a/src/newgrf_text.cpp +++ b/src/newgrf_text.cpp @@ -691,7 +691,7 @@ StringID AddGRFString(uint32 grfid, uint16 stringid, byte langid_to_add, bool ne } AddGRFTextToList(&_grf_text[id].textholder, newtext); - grfmsg(3, "Added 0x%X: grfid %08X string 0x%X lang 0x%X string '%s'", id, grfid, stringid, newtext->langid, newtext->text); + grfmsg(3, "Added 0x%X: grfid %08X string 0x%X lang 0x%X string '%s' (%X)", id, grfid, stringid, newtext->langid, newtext->text, MakeStringID(TEXT_TAB_NEWGRF_START, id)); return MakeStringID(TEXT_TAB_NEWGRF_START, id); } @@ -699,7 +699,7 @@ StringID AddGRFString(uint32 grfid, uint16 stringid, byte langid_to_add, bool ne /** * Returns the index for this stringid associated with its grfID */ -StringID GetGRFStringID(uint32 grfid, uint16 stringid) +StringID GetGRFStringID(uint32 grfid, StringID stringid) { for (uint id = 0; id < _num_grf_texts; id++) { if (_grf_text[id].grfid == grfid && _grf_text[id].stringid == stringid) { diff --git a/src/newgrf_text.h b/src/newgrf_text.h index 6587fc1fe..033967d30 100644 --- a/src/newgrf_text.h +++ b/src/newgrf_text.h @@ -21,7 +21,7 @@ static const WChar NFO_UTF8_IDENTIFIER = 0x00DE; StringID AddGRFString(uint32 grfid, uint16 stringid, byte langid, bool new_scheme, bool allow_newlines, const char *text_to_add, StringID def_string); -StringID GetGRFStringID(uint32 grfid, uint16 stringid); +StringID GetGRFStringID(uint32 grfid, StringID stringid); const char *GetGRFStringFromGRFText(const struct GRFText *text); const char *GetGRFStringPtr(uint16 stringid); void CleanUpStrings(); |