Fix #15584: Ride income underflows when on-ride photos are making losses

This commit is contained in:
Michael Steenbeek 2021-10-17 09:15:13 +02:00 committed by GitHub
parent c01aedf32e
commit 5cb1cee0d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -41,6 +41,7 @@
- Fix: [#15560] Memory leak due to OpenGL Renderer not releasing a texture.
- Fix: [#15567] Litter not being counted correctly during Park rating calculation (original bug).
- Fix: [#15582] [Plugin] Litter properties return incorrect values.
- Fix: [#15584] Ride income underflows when on-ride photos are making losses.
- Improved: [#3417] Crash dumps are now placed in their own folder.
- Improved: [#13524] macOS arm64 native (universal) app
- Improved: [#15538] Software rendering can now draw in parallel when Multithreading is enabled.

View File

@ -374,7 +374,7 @@ money64 Ride::CalculateIncomePerHour() const
// TODO: use data from the last 5 minutes instead of all-time values for a more accurate calculation
if (rideTicketsSold > 0)
{
priceMinusCost += ((no_secondary_items_sold * shopItemProfit) / rideTicketsSold);
priceMinusCost += ((static_cast<int32_t>(no_secondary_items_sold) * shopItemProfit) / rideTicketsSold);
}
}
else