From 1c0c4637d2d65194dcc10ab727a99ec74ea5d962 Mon Sep 17 00:00:00 2001 From: Rubidium Date: Sat, 10 Jul 2021 10:14:05 +0200 Subject: 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). --- src/newgrf_text.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/newgrf_text.cpp b/src/newgrf_text.cpp index 18a876a6a..6617365f9 100644 --- a/src/newgrf_text.cpp +++ b/src/newgrf_text.cpp @@ -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; } } -- cgit v1.2.3-70-g09d2