* Crash safety check in Bag::StoreItem by Visagalis/QAston

--HG--
branch : trunk
This commit is contained in:
Machiavelli
2009-06-24 20:09:19 +02:00
parent 3fcfbffde7
commit 3c40065564

View File

@@ -159,7 +159,11 @@ void Bag::RemoveItem( uint8 slot, bool /*update*/ )
void Bag::StoreItem( uint8 slot, Item *pItem, bool /*update*/ )
{
assert(slot < MAX_BAG_SIZE);
if(slot > MAX_BAG_SIZE)
{
sLog.outError("Player GUID" UI64FMTD "tried to manipulate packets and crash the server.", GetOwnerGUID());
return;
}
if( pItem )
{