diff --git a/src/peep/peep.c b/src/peep/peep.c index 4eac6de29f..f536601eb1 100644 --- a/src/peep/peep.c +++ b/src/peep/peep.c @@ -1578,7 +1578,8 @@ void remove_peep_from_queue(rct_peep* peep) return; } - for (rct_peep* other_peep = GET_PEEP(ride->last_peep_in_queue[cur_station]);; + for (rct_peep* other_peep = GET_PEEP(ride->last_peep_in_queue[cur_station]); + ride->last_peep_in_queue[cur_station] != 0xFFFF; other_peep = GET_PEEP(other_peep->next_in_queue)){ if (peep->sprite_index == other_peep->next_in_queue){ other_peep->next_in_queue = peep->next_in_queue;