mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-15 11:03:00 +01:00
Fix overflow in ride_mode_tweak (#3478)
Fixes #2529: Time overflow when unlocking dodgems' operating limits Fixes #3424: Max. people on ride overflows when operating limit is unlocked
This commit is contained in:
@@ -2798,9 +2798,9 @@ static void window_ride_mode_tweak_increase(rct_window *w)
|
||||
}
|
||||
|
||||
uint8 increment = ride->mode == RIDE_MODE_BUMPERCAR ? 10 : 1;
|
||||
uint8 newValue = ride->operation_option + increment;
|
||||
if (newValue <= maxValue) {
|
||||
window_ride_mode_tweak_set(w, newValue);
|
||||
|
||||
if (maxValue - increment >= ride->operation_option) {
|
||||
window_ride_mode_tweak_set(w, ride->operation_option + increment);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user