mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-06 06:32:56 +01:00
Validate ride type to create
This commit is contained in:
@@ -5305,6 +5305,12 @@ money32 ride_create(int type, int subType, int flags, int *outRideIndex, int *ou
|
||||
rct_ride_type *rideEntry;
|
||||
int rideIndex, rideEntryIndex;
|
||||
|
||||
if (type > 90)
|
||||
{
|
||||
log_warning("Invalid request for ride type %u", type);
|
||||
return MONEY32_UNDEFINED;
|
||||
}
|
||||
|
||||
if (subType == 255) {
|
||||
uint8 *availableRideEntries = get_ride_entry_indices_for_ride_type(type);
|
||||
for (uint8 *rei = availableRideEntries; *rei != 255; rei++) {
|
||||
|
||||
Reference in New Issue
Block a user