mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-16 00:12:51 +00:00
(svn r25809) -Fix: [Script] Decoding JSON data with an empty array from Admin port failed
This commit is contained in:
parent
a39ac14723
commit
48a21c582e
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user