diff options
author | pt300 <pt300@tlen.pl> | 2016-10-01 18:07:35 +0200 |
---|---|---|
committer | pt300 <pt300@tlen.pl> | 2016-10-01 18:07:35 +0200 |
commit | ad72aac67ab84280cbd7e08b2668ef7fe5db046e (patch) | |
tree | e4fb919ebd894e4b291ebe0210b6a962ca70af46 /jsmn.c | |
parent | 6021415cc75e7922d45b12935f56348b064d8a7f (diff) |
Partialy fixes zserge/jsmn#81
Still will report invalid amount if we fetch it with something like "{"key 1": 1234}}"
Diffstat (limited to 'jsmn.c')
-rw-r--r-- | jsmn.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -198,6 +198,9 @@ int jsmn_parse(jsmn_parser *parser, const char *js, size_t len, break; } if (token->parent == -1) { + if(token->type != type) { + return JSMN_ERROR_INVAL; + } break; } token = &tokens[token->parent]; |