summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/map/clif.c1
-rw-r--r--src/map/pc.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index 4d298f520..3f45c7aca 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -3824,6 +3824,7 @@ static void clif_equipitemack(struct map_session_data *sd, int n, int pos, enum
p.index = n+2;
p.wearLocation = pos;
#if PACKETVER >= 20100629
+ Assert_retv(n >= 0 && n < MAX_INVENTORY);
if (result == EIA_SUCCESS && sd->inventory_data[n]->equip&EQP_VISIBLE)
p.wItemSpriteNumber = sd->inventory_data[n]->view_sprite;
else
diff --git a/src/map/pc.c b/src/map/pc.c
index fcd36a233..0a2508f29 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -1073,6 +1073,7 @@ static int pc_isequip(struct map_session_data *sd, int n)
struct item_data *item;
nullpo_ret(sd);
+ Assert_ret(n >= 0 && n < MAX_INVENTORY);
item = sd->inventory_data[n];