mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-27 16:54:52 +01:00
Fix #14918 refactor while loop and int variable size
This commit is contained in:
@@ -1601,15 +1601,15 @@ static void window_ride_init_viewport(rct_window* w)
|
||||
else if (eax >= ride->num_vehicles && eax < (ride->num_vehicles + ride->num_stations))
|
||||
{
|
||||
StationIndex stationIndex = STATION_INDEX_NULL;
|
||||
int32_t count = eax - ride->num_vehicles;
|
||||
do
|
||||
int count = eax - ride->num_vehicles;
|
||||
while (count >= 0)
|
||||
{
|
||||
stationIndex++;
|
||||
if (!ride->stations[stationIndex].Start.isNull())
|
||||
{
|
||||
count--;
|
||||
}
|
||||
} while (count >= 0);
|
||||
}
|
||||
|
||||
auto location = ride->stations[stationIndex].GetStart();
|
||||
focus.coordinate.x = location.x;
|
||||
|
||||
Reference in New Issue
Block a user