From a34957eb413ddd9766424a8fa413c66d7a7ecbf0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Janiszewski?= Date: Sat, 22 Dec 2018 15:35:26 +0100 Subject: [PATCH] Add ride type check to rct_peep::ShouldGoOnRide --- src/openrct2/peep/Guest.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/openrct2/peep/Guest.cpp b/src/openrct2/peep/Guest.cpp index 82eb5c539b..22d429b4ad 100644 --- a/src/openrct2/peep/Guest.cpp +++ b/src/openrct2/peep/Guest.cpp @@ -1718,6 +1718,7 @@ bool rct_peep::ShouldGoOnRide(int32_t rideIndex, int32_t entranceNum, bool atQue if (ride->status == RIDE_STATUS_OPEN && !(ride->lifecycle_flags & RIDE_LIFECYCLE_BROKEN_DOWN)) { // Peeps that are leaving the park will refuse to go on any rides, with the exception of free transport rides. + assert(ride->type < std::size(RideData4)); if (!(RideData4[ride->type].flags & RIDE_TYPE_FLAG4_TRANSPORT_RIDE) || ride->value == 0xFFFF || ride_get_price(ride) != 0) {