summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/map/script.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/map/script.c b/src/map/script.c
index f014aab7e..4ceb32991 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -17251,11 +17251,12 @@ BUILDIN(queueiterator) {
}
}
- if( i == script->hqis )
+ if( i == script->hqis ) {
RECREATE(script->hqi, struct hQueueIterator, ++script->hqis);
- else
+ script->hqi[ idx ].item = NULL;
+ } else
idx = i;
-
+
RECREATE(script->hqi[ idx ].item, int, queue->items);
memcpy(&script->hqi[idx].item, &queue->item, sizeof(int)*queue->items);