Core/Loot: fix possible crash from having a bad item

This commit is contained in:
Kandera
2012-07-06 10:26:37 -04:00
parent 5395c4f6c6
commit 481e874811

View File

@@ -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;