summaryrefslogtreecommitdiff
path: root/src/emap/scriptdefines.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/emap/scriptdefines.h')
-rw-r--r--src/emap/scriptdefines.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/emap/scriptdefines.h b/src/emap/scriptdefines.h
index 69c69b0..b70bec4 100644
--- a/src/emap/scriptdefines.h
+++ b/src/emap/scriptdefines.h
@@ -106,7 +106,7 @@
#define getInventoryIndex(idx) \
const int n = script_getnum(st, idx); \
- if (n < 0 || n >= MAX_INVENTORY) \
+ if (n < 0 || n >= sd->status.inventorySize) \
{ \
ShowWarning("Wrong inventory index\n"); \
script->reportsrc(st); \