* Fix a crash in Player::BuyItemFromVendor caused by player spoofing packets

--HG--
branch : trunk
This commit is contained in:
Machiavelli
2009-06-24 19:46:54 +02:00
parent 5090a5967a
commit 3c568253dc
+4
View File
@@ -17640,6 +17640,10 @@ bool Player::BuyItemFromVendor(uint64 vendorguid, uint32 item, uint8 count, uint
// cheating attempt // cheating attempt
if(count < 1) count = 1; if(count < 1) count = 1;
// cheating attempt
if(slot > MAX_BAG_SIZE)
return false;
if(!isAlive()) if(!isAlive())
return false; return false;