Fix #13916: use correct constant for maximum station locations

This commit is contained in:
ζeh Matt 2021-01-24 00:06:05 +02:00 committed by GitHub
parent eb52391b9a
commit 329b228cac
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View file

@ -6966,7 +6966,7 @@ void sub_6CB945(Ride* ride)
}
}
FixedVector<TileCoordsXYZD, MAX_STATIONS> locations;
FixedVector<TileCoordsXYZD, MAX_STATION_LOCATIONS> locations;
for (StationIndex stationId = 0; stationId < MAX_STATIONS; ++stationId)
{
auto entrance = ride_get_entrance_location(ride, stationId);

View file

@ -46,6 +46,7 @@ struct Staff;
#define RIDE_TYPE_NULL 255
#define RIDE_ADJACENCY_CHECK_DISTANCE 5
constexpr uint16_t const MAX_STATION_LOCATIONS = MAX_STATIONS * 2; // Entrance and exit per station
constexpr uint16_t const MAX_INVERSIONS = RCT12_MAX_INVERSIONS;
constexpr uint16_t const MAX_GOLF_HOLES = RCT12_MAX_GOLF_HOLES;
constexpr uint16_t const MAX_HELICES = RCT12_MAX_HELICES;