diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/newgrf.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/newgrf.cpp b/src/newgrf.cpp index f44b993cd..e99915b57 100644 --- a/src/newgrf.cpp +++ b/src/newgrf.cpp @@ -4796,7 +4796,10 @@ static void FeatureTownName(byte *buf, size_t len) if (!check_length(len, 1, "FeatureTownName: style name")) return; const char *name = grf_load_string(&buf, len); len -= strlen(name) + 1; - grfmsg(6, "FeatureTownName: lang 0x%X -> '%s'", lang, TranslateTTDPatchCodes(grfid, name)); + + char *lang_name = TranslateTTDPatchCodes(grfid, name); + grfmsg(6, "FeatureTownName: lang 0x%X -> '%s'", lang, lang_name); + free(lang_name); townname->name[nb_gen] = AddGRFString(grfid, id, lang, new_scheme, name, STR_UNDEFINED); |