diff options
Diffstat (limited to 'src/emap/script_buildins.c')
-rw-r--r-- | src/emap/script_buildins.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/emap/script_buildins.c b/src/emap/script_buildins.c index 78b9ac6..e1c9123 100644 --- a/src/emap/script_buildins.c +++ b/src/emap/script_buildins.c @@ -1710,7 +1710,7 @@ BUILDIN(getInvIndexLink) int index = script_getnum (st, 2); - if (index < 0 || index >= MAX_INVENTORY) + if (index < 0 || index >= MAX_INVENTORY || (sd && index >= sd->status.inventorySize)) { script_pushstr(st, ""); return false; |