Fix #21691: Use correct iterator in RideCheckTrackContainsBanked (#21701)

This commit is contained in:
Michał Janiszewski 2024-04-01 00:23:37 +02:00 committed by GitHub
parent 19a65d1642
commit 06081eb23d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

View File

@ -28,6 +28,7 @@
- Fix: [#21641] Crash when creating track iterator from an invalid tile element.
- Fix: [#21652] Dialog window to confirm overwriting files does not apply the theme colours correctly.
- Fix: [#21668] Crash when on null ride in Guest::UpdateRideLeaveExit.
- Fix: [#21691] Crash when validating rides which can't contain banked track.
- Fix: [objects#290] “Haunted Mansion” cars have a non-functional third remap colour.
- Fix: [objects#296] Incorrect wall placement around large Kremlin/drab pieces.
- Fix: [objects#300] Incorrect Colosseum and volcano corner clearances.

View File

@ -2858,7 +2858,7 @@ static bool RideCheckTrackContainsBanked(const CoordsXYE& input, CoordsXYE* outp
while (TrackCircuitIteratorNext(&it))
{
auto trackType = output->element->AsTrack()->GetTrackType();
auto trackType = it.current.element->AsTrack()->GetTrackType();
const auto& ted = GetTrackElementDescriptor(trackType);
if (ted.Flags & TRACK_ELEM_FLAG_BANKED)
{