From e9ecf6ee4a919dcba78d8f415a60d44d23862df6 Mon Sep 17 00:00:00 2001 From: Ernest Wong Date: Mon, 6 Mar 2023 09:16:31 +1300 Subject: [PATCH] Fix #19553: Undefined upkeep cost check uses new sentinel value (#19568) * Fix #19553: Undefined upkeep cost check uses new sentinel value Mistake from #19469 --- contributors.md | 1 + src/openrct2/management/Finance.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/contributors.md b/contributors.md index b2d321f372..26b7168cda 100644 --- a/contributors.md +++ b/contributors.md @@ -211,6 +211,7 @@ The following people are not part of the development team, but have been contrib * Nehemiah Negussie (nehemiah-negussie) * (zzril) * Ernest Elgin (eaeiv) +* Ernest Wong (ErnWong) ## Toolchain diff --git a/src/openrct2/management/Finance.cpp b/src/openrct2/management/Finance.cpp index 025340238a..2d5d872510 100644 --- a/src/openrct2/management/Finance.cpp +++ b/src/openrct2/management/Finance.cpp @@ -173,7 +173,7 @@ void FinancePayRideUpkeep() if (ride.status != RideStatus::Closed && !(gParkFlags & PARK_FLAGS_NO_MONEY)) { auto upkeep = ride.upkeep_cost; - if (upkeep != -1) + if (upkeep != MONEY64_UNDEFINED) { ride.total_profit -= upkeep; ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME;