summaryrefslogtreecommitdiff
path: root/src/map/atcommand.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/atcommand.c')
-rw-r--r--src/map/atcommand.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index 7e1b53a6f..b5e8fa797 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -8214,8 +8214,7 @@ ACMD(delitem) {
total = amount;
// delete items
- while( amount && ( idx = pc->search_inventory(sd, nameid) ) != -1 )
- {
+ while (amount && (idx = pc->search_inventory(sd, nameid)) != INDEX_NOT_FOUND) {
int delamount = ( amount < sd->status.inventory[idx].amount ) ? amount : sd->status.inventory[idx].amount;
if( sd->inventory_data[idx]->type == IT_PETEGG && sd->status.inventory[idx].card[0] == CARD0_PET )