diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/game/Bag.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/game/Bag.cpp b/src/game/Bag.cpp index 2d58b63c0a9..bd3250ee322 100644 --- a/src/game/Bag.cpp +++ b/src/game/Bag.cpp @@ -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 ) { |