1
0
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:
saad
2021-07-30 18:38:42 +04:00
parent 62d66ca9d0
commit fd823c8acb

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;