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

Industry cargo suffix string should be mapped to 0xD000-0xD400 when the callback result is between 0x800-0xC00,
This commit is contained in:
Peter Nelson 2025-01-08 19:37:38 +00:00 committed by GitHub
parent ce4012b7c7
commit f404f3154e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -127,7 +127,7 @@ static void GetCargoSuffix(uint cargo, CargoSuffixType cst, const Industry *ind,
}
if (callback >= 0x800 && callback < 0xC00) {
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();
suffix.display = CSD_CARGO_TEXT;
return;