Skip to content
Snippets Groups Projects
Commit c8b2c61b authored by Julian Rother's avatar Julian Rother
Browse files

json: Made jlookup return 0 for empty arrays/dicts

parent 0ef5fc48
Branches
No related tags found
No related merge requests found
...@@ -163,9 +163,12 @@ char *jenter(char *s) ...@@ -163,9 +163,12 @@ char *jenter(char *s)
if (!s) if (!s)
return 0; return 0;
s = skip_ws(s); s = skip_ws(s);
if (*s == '[' || *s == '{') if (*s != '[' && *s != '{')
return s+1; return 0;
s = skip_ws(s+1);
if (*s == ']' || *s == '}')
return 0; return 0;
return s;
} }
char *jnext(char *s) char *jnext(char *s)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment