(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 a39ac14723
commit 48a21c582e

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