forked from rosebudai/OpenRCT2-Web
Return false for non-existing ride types
Co-Authored-By: Tulio Leao <tupaschoal@gmail.com>
This commit is contained in:
1 parent
20fd115d8d
commit
777201c7fd
1 file changed
+9
-2
@@ -5658,8 +5658,15 @@ rct_ride_name get_ride_naming(const uint8_t rideType, rct_ride_entry* rideEntry)
|
||||
|
||||
bool ride_type_has_flag(int32_t rideType, uint64_t flag)
|
||||
{
|
||||
Guard::Assert(rideType < static_cast<int32_t>(std::size(RideTypeDescriptors)));
|
||||
return (RideTypeDescriptors[rideType].Flags & flag) != 0;
|
||||
if (rideType < static_cast<int32_t>(std::size(RideTypeDescriptors)))
|
||||
{
|
||||
return (RideTypeDescriptors[rideType].Flags & flag) != 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
Guard::Assert(false);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in new issue
Block a user