1
0
Fork 0

Fix #13293: Incorrect GRFStringID used for industry cargo suffix text.

Industry cargo suffix string should be mapped to 0xD000-0xD400 when the callback result is between 0x800-0xC00,
pull/13294/head
Peter Nelson 2025-01-08 17:53:56 +00:00
parent d79ae73c14
commit 297e30b170
No known key found for this signature in database
GPG Key ID: 8EF8F0A467DF75ED
1 changed files with 1 additions and 1 deletions

View File

@ -127,7 +127,7 @@ static void GetCargoSuffix(uint cargo, CargoSuffixType cst, const Industry *ind,
} }
if (callback >= 0x800 && callback < 0xC00) { if (callback >= 0x800 && callback < 0xC00) {
StartTextRefStackUsage(indspec->grf_prop.grffile, 6); StartTextRefStackUsage(indspec->grf_prop.grffile, 6);
suffix.text = GetString(GetGRFStringID(indspec->grf_prop.grfid, GRFSTR_MISC_GRF_TEXT + callback)); suffix.text = GetString(GetGRFStringID(indspec->grf_prop.grfid, GRFSTR_MISC_GRF_TEXT + callback - 0x800));
StopTextRefStackUsage(); StopTextRefStackUsage();
suffix.display = CSD_CARGO_TEXT; suffix.display = CSD_CARGO_TEXT;
return; return;