Commit c8b2c61b authored by Julian Rother's avatar Julian Rother

json: Made jlookup return 0 for empty arrays/dicts

parent 0ef5fc48
......@@ -163,9 +163,12 @@ char *jenter(char *s)
if (!s)
return 0;
s = skip_ws(s);
if (*s == '[' || *s == '{')
return s+1;
return 0;
if (*s != '[' && *s != '{')
return 0;
s = skip_ws(s+1);
if (*s == ']' || *s == '}')
return 0;
return s;
}
char *jnext(char *s)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment