mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 17:27:36 +01:00
Core/Loot: fix possible crash from having a bad item
This commit is contained in:
@@ -472,7 +472,7 @@ void WorldSession::HandleLootMasterGiveOpcode(WorldPacket & recv_data)
|
||||
if (!loot)
|
||||
return;
|
||||
|
||||
if (slotid > loot->items.size() + loot->quest_items.size())
|
||||
if (slotid >= loot->items.size() + loot->quest_items.size())
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_LOOT, "MasterLootItem: Player %s might be using a hack! (slot %d, size %lu)", GetPlayer()->GetName(), slotid, (unsigned long)loot->items.size());
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user