Fix #17834: finance window becomes blank after 4096 years

This commit is contained in:
skdltmxn 2022-08-18 06:05:18 +09:00 committed by GitHub
parent 815d5ce2d5
commit 4fcdafc0f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 4 deletions

View File

@ -36,6 +36,7 @@
- Fix: [#17703] (undefined string) when building on invalid height. - Fix: [#17703] (undefined string) when building on invalid height.
- Fix: [#17776] “Other Parks” tab uses separate lists for SC4/SC6 and .park scenarios. - Fix: [#17776] “Other Parks” tab uses separate lists for SC4/SC6 and .park scenarios.
- Fix: [#17784] Colour preset RNG is biased (original bug). - Fix: [#17784] Colour preset RNG is biased (original bug).
- Fix: [#17834] Finance window becomes blank after 4096 years.
0.4.1 (2022-07-04) 0.4.1 (2022-07-04)
------------------------------------------------------------------------ ------------------------------------------------------------------------

View File

@ -379,14 +379,12 @@ public:
} }
// Expenditure / Income values for each month // Expenditure / Income values for each month
int16_t currentMonthYear = static_cast<int16_t>(gDateMonthsElapsed); uint16_t currentMonthYear = static_cast<uint16_t>(gDateMonthsElapsed);
for (int32_t i = SummaryMaxAvailableMonth(); i >= 0; i--) for (int32_t i = SummaryMaxAvailableMonth(); i >= 0; i--)
{ {
screenCoords.y = 0; screenCoords.y = 0;
int16_t monthyear = currentMonthYear - i; uint16_t monthyear = currentMonthYear - i;
if (monthyear < 0)
continue;
// Month heading // Month heading
auto ft = Formatter(); auto ft = Formatter();