mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-10-31 15:20:10 +00:00
(svn r14737) -Fix (r10211): memory leak in Action 0x0F (new town names)
This commit is contained in:
parent
4ec06cc478
commit
921863da15
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user