1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-29 01:19:11 +00:00

Fix 11ab3c4: [NewGRF] Overflow when determining cargo mask for string code 9A 1E

9A 1E: Print unsigned word as name of a cargo type (translated for GRF version >= 7).
This commit is contained in:
Rubidium
2021-07-10 10:14:05 +02:00
committed by rubidium42
parent ede3f79475
commit 1c0c4637d2

View File

@@ -949,7 +949,7 @@ uint RemapNewGRFStringControlCode(uint scc, char *buf_start, char **buff, const
case SCC_NEWGRF_PRINT_WORD_CARGO_NAME: {
CargoID cargo = GetCargoTranslation(_newgrf_textrefstack.PopUnsignedWord(), _newgrf_textrefstack.grffile);
*argv = cargo < NUM_CARGO ? 1 << cargo : 0;
*argv = cargo < NUM_CARGO ? 1ULL << cargo : 0;
break;
}
}