mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 18:15:31 +01:00
Core/Vehicles: Fixed a crash that happened during seat changes searching for a previous free seat
Closes #9609
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user