1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-24 15:24:30 +01:00

Make all access to RTD table use the bounds checking function

This commit is contained in:
Gymnasiast
2021-02-26 10:01:00 +01:00
parent 62f8796677
commit 44d0e77afb
31 changed files with 93 additions and 93 deletions

View File

@@ -404,7 +404,7 @@ void RideObject::SetRepositoryItem(ObjectRepositoryItem* item) const
{
// Find the first non-null ride type, to be used when checking the ride group and determining the category.
uint8_t firstRideType = ride_entry_get_first_non_null_ride_type(&_legacyType);
uint8_t category = RideTypeDescriptors[firstRideType].Category;
uint8_t category = GetRideTypeDescriptor(firstRideType).Category;
for (int32_t i = 0; i < RCT2_MAX_RIDE_TYPES_PER_RIDE_ENTRY; i++)
{