summaryrefslogtreecommitdiff
path: root/src/script
diff options
context:
space:
mode:
Diffstat (limited to 'src/script')
-rw-r--r--src/script/api/script_event_types.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/script/api/script_event_types.cpp b/src/script/api/script_event_types.cpp
index 0e1683440..f22bb2f61 100644
--- a/src/script/api/script_event_types.cpp
+++ b/src/script/api/script_event_types.cpp
@@ -244,6 +244,14 @@ char *ScriptEventAdminPort::ReadValue(HSQUIRRELVM vm, char *p)
/* Array */
sq_newarray(vm, 0);
+ /* Empty array? */
+ char *p2 = p+1;
+ SKIP_EMPTY(p2);
+ if (*p2 == ']') {
+ p = p2+1;
+ break;
+ }
+
while (*p++ != ']') {
p = this->ReadValue(vm, p);
if (p == NULL) {