From 33d9b82c0c93e81e37852b0ef4a1bddaea6f09eb Mon Sep 17 00:00:00 2001 From: Rubidium Date: Sun, 31 May 2026 19:00:08 +0200 Subject: [PATCH] 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. --- src/newgrf/newgrf_actf.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/newgrf/newgrf_actf.cpp b/src/newgrf/newgrf_actf.cpp index 7e29773874..980ecddc20 100644 --- a/src/newgrf/newgrf_actf.cpp +++ b/src/newgrf/newgrf_actf.cpp @@ -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);