summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 cbbf306d1..efce0b986 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -19091,7 +19091,7 @@ BUILDIN(qiget) {
if( idx < 0 || idx >= script->hqis ) {
ShowWarning("buildin_qiget: unknown queue iterator id %d\n",idx);
script_pushint(st, 0);
- } else if ( script->hqi[idx].pos -1 == script->hqi[idx].items ) {
+ } else if (script->hqi[idx].pos >= script->hqi[idx].items) {
script_pushint(st, 0);
} else {
struct hQueueIterator *it = &script->hqi[idx];
@@ -19108,7 +19108,7 @@ BUILDIN(qicheck) {
if( idx < 0 || idx >= script->hqis ) {
ShowWarning("buildin_qicheck: unknown queue iterator id %d\n",idx);
script_pushint(st, 0);
- } else if ( script->hqi[idx].pos -1 == script->hqi[idx].items ) {
+ } else if (script->hqi[idx].pos >= script->hqi[idx].items) {
script_pushint(st, 0);
} else {
script_pushint(st, 1);