summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2018-11-24 21:25:51 +0300
committerAndrei Karas <akaras@inbox.ru>2018-12-12 21:18:06 +0300
commit15f51b36f4eb881b33bd56b434ba181d3add754d (patch)
tree4f35e89d044c8e66c7a7cd8b82b7d08b1127dcb4 /src/map/pc.c
parent2d33d766bd7ea81eb40c15fe45d59ab155b16fde (diff)
downloadhercules-15f51b36f4eb881b33bd56b434ba181d3add754d.tar.gz
hercules-15f51b36f4eb881b33bd56b434ba181d3add754d.tar.bz2
hercules-15f51b36f4eb881b33bd56b434ba181d3add754d.tar.xz
hercules-15f51b36f4eb881b33bd56b434ba181d3add754d.zip
Add some missing checks for inventory index variable.
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c1
1 files changed, 1 insertions, 0 deletions
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];