mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2026-07-15 15:19:52 +00:00
Fix: town name language incorrectly decoded
Both the GRF version < 7 and >= 7 are supported, but the debug message assumes the latter. Also, use the same 'default' language for decoding the string as is done for the part name later in the function.
This commit is contained in:
@@ -50,8 +50,7 @@ static void FeatureTownName(ByteReader &buf)
|
||||
|
||||
std::string_view name = buf.ReadString();
|
||||
|
||||
std::string lang_name = TranslateTTDPatchCodes(grfid, lang, false, name);
|
||||
GrfMsg(6, "FeatureTownName: lang 0x{:X} -> '{}'", lang, lang_name);
|
||||
GrfMsg(6, "FeatureTownName: lang 0x{:X} (new_scheme: {}) -> '{}'", lang, new_scheme, TranslateTTDPatchCodes(grfid, 0, false, name));
|
||||
|
||||
style = AddGRFString(grfid, GRFStringID{id}, lang, new_scheme, false, name, STR_UNDEFINED);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user