fix: out-of-bounds index in itemDeleteHandler()

This commit is contained in:
CPunch 2023-12-18 04:41:53 -06:00
parent d9ebb4e3ef
commit e61682dfb2
1 changed files with 3 additions and 0 deletions

View File

@ -416,6 +416,9 @@ static void itemDeleteHandler(CNSocket* sock, CNPacketData* data) {
Player* plr = PlayerManager::getPlayer(sock);
if (itemdel->iSlotNum < 0 || itemdel->iSlotNum >= AINVEN_COUNT)
return; // sanity check
resp.eIL = itemdel->eIL;
resp.iSlotNum = itemdel->iSlotNum;