X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=src%2Fload.c;h=54d53b1fa08208eddf01ca593a767110411c4e95;hb=514bbeaf7fd2f005aea34257d89cc27b3b8919cf;hp=ace963a91f64932a8ffbbcd9ee9b7bdefa743017;hpb=9ea51b28550555484583713261e45df13026fba8;p=jansson.git diff --git a/src/load.c b/src/load.c index ace963a..54d53b1 100644 --- a/src/load.c +++ b/src/load.c @@ -274,7 +274,10 @@ static json_t *json_parse_object(json_lex *lex) return NULL; json_lex_scan(lex); - while(1) { + if(lex->token == '}') + return object; + + while(lex->token) { char *key; json_t *value;