Core/Vehicles: Fixed a crash that happened during seat changes searching for a previous free seat

Closes #9609
This commit is contained in:
Shauren
2013-05-17 22:25:47 +02:00
parent 7d46703413
commit 6d0b14d5f5

View File

@@ -353,8 +353,9 @@ SeatMap::const_iterator Vehicle::GetNextEmptySeat(int8 seatId, bool next) const
}
else
{
if (seat-- == Seats.begin())
if (seat == Seats.begin())
seat = Seats.end();
--seat;
}
// Make sure we don't loop indefinetly