diff options
author | Olivier Bertrand <bertrandop@gmail.com> | 2020-12-18 18:59:52 +0100 |
---|---|---|
committer | Olivier Bertrand <bertrandop@gmail.com> | 2020-12-18 18:59:52 +0100 |
commit | 24c18ce8926105d77ebff2d63611af440aaa8bee (patch) | |
tree | c79884d2b7e9db78e7a6db39ddd17c706e920545 /storage/connect/json.cpp | |
parent | a7867410009ce91e3e710ace0b0d97261170d44a (diff) | |
download | mariadb-git-24c18ce8926105d77ebff2d63611af440aaa8bee.tar.gz |
- Fix json parser (void objects not recognized) modified: json.cpp
Diffstat (limited to 'storage/connect/json.cpp')
-rw-r--r-- | storage/connect/json.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/storage/connect/json.cpp b/storage/connect/json.cpp index 7c1748e0fde..bcbd71b5031 100644 --- a/storage/connect/json.cpp +++ b/storage/connect/json.cpp @@ -554,7 +554,7 @@ PJAR JDOC::ParseArray(PGLOBAL g, int& i) PJOB JDOC::ParseObject(PGLOBAL g, int& i) { PSZ key; - int level = 0; + int level = -1; PJOB jobp = new(g) JOBJECT; PJPR jpp = NULL; @@ -590,7 +590,7 @@ PJOB JDOC::ParseObject(PGLOBAL g, int& i) break; case '}': - if (level < 2) { + if (level == 0 || level == 1) { sprintf(g->Message, "Unexpected '}' near %.*s", ARGS); throw 2; } // endif level |