(svn r25809) -Fix: [Script] Decoding JSON data with an empty array from Admin port failed

This commit is contained in:
zuu 2013-10-03 16:47:24 +00:00
parent 3ad1896273
commit 8895ae5e0d
1 changed files with 8 additions and 0 deletions

View File

@ -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) {