mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-25 12:04:47 +00:00
Fix MG_EOO
This commit is contained in:
1 parent
d1828ecdb4
commit
1eed80375d
3 files changed
+13
-13
No files matched your search
+6
-6
@@ -58,12 +58,12 @@ int mg_json_get(const char *s, int len, const char *path, int *toklen) {
|
||||
|
||||
// In the ascii table, the distance between `[` and `]` is 2.
|
||||
// Ditto for `{` and `}`. Hence +2 in the code below.
|
||||
#define MG_EOO(x) \
|
||||
do { \
|
||||
if (depth == ed && ci != ei) return MG_JSON_NOT_FOUND; \
|
||||
if (c != nesting[depth - 1] + 2) return MG_JSON_INVALID; \
|
||||
depth--; \
|
||||
MG_CHECKRET(x); \
|
||||
#define MG_EOO(x) \
|
||||
do { \
|
||||
if (depth == ed && (ci != ei || ci < 0)) return MG_JSON_NOT_FOUND; \
|
||||
if (c != nesting[depth - 1] + 2) return MG_JSON_INVALID; \
|
||||
depth--; \
|
||||
MG_CHECKRET(x); \
|
||||
} while (0)
|
||||
|
||||
for (i = 0; i < len; i++) {
|
||||
|
||||
Reference in new issue
Block a user