summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
Diffstat (limited to 'src/map')
-rw-r--r--src/map/script.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/map/script.c b/src/map/script.c
index bdd6a5897..19fb01cc3 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -10331,7 +10331,7 @@ BUILDIN_FUNC(getiteminfo)
n = script_getnum(st,3);
i_data = itemdb_exists(item_id);
- if (i_data && n>=0 && n<14) {
+ if (i_data && n>=0 && n<=14) {
item_arr = (int*)&i_data->value_buy;
script_pushint(st,item_arr[n]);
} else
@@ -10373,7 +10373,7 @@ BUILDIN_FUNC(setiteminfo)
value = script_getnum(st,4);
i_data = itemdb_exists(item_id);
- if (i_data && n>=0 && n<14) {
+ if (i_data && n>=0 && n<=14) {
item_arr = (int*)&i_data->value_buy;
item_arr[n] = value;
script_pushint(st,value);