Fix #14918 refactor while loop and int variable size

This commit is contained in:
saad 2021-07-30 18:38:42 +04:00
parent 62d66ca9d0
commit fd823c8acb
1 changed files with 3 additions and 3 deletions

View File

@ -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;