projects
/
jansson.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9ea51b2
)
Parse an empty object correctly
author
Petri Lehtinen
<petri@digip.org>
Wed, 6 May 2009 18:01:00 +0000
(21:01 +0300)
committer
Petri Lehtinen
<petri@digip.org>
Tue, 12 May 2009 18:44:45 +0000
(21:44 +0300)
src/load.c
patch
|
blob
|
history
diff --git
a/src/load.c
b/src/load.c
index
ace963a
..
54d53b1
100644
(file)
--- 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;