diff options
author | Petri Lehtinen <petri@digip.org> | 2009-11-04 22:10:46 +0200 |
---|---|---|
committer | Petri Lehtinen <petri@digip.org> | 2009-11-04 22:10:46 +0200 |
commit | 17d913307e60d1c3e41d01d9a4be81892d610b3f (patch) | |
tree | acfc2909da35a08488ee934ce543c0ebf172038c /src | |
parent | f236c14dc5457a41119492ebce41b8920fd31f65 (diff) | |
parent | d3959a8ce79bb30a8b39a275a4682885e97d17cc (diff) | |
download | jansson-17d913307e60d1c3e41d01d9a4be81892d610b3f.zip jansson-17d913307e60d1c3e41d01d9a4be81892d610b3f.tar.gz jansson-17d913307e60d1c3e41d01d9a4be81892d610b3f.tar.bz2 |
Merge branch '1.1'
Conflicts:
test/.gitignore
test/testprogs/Makefile.am
Diffstat (limited to 'src')
-rw-r--r-- | src/load.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -418,11 +418,15 @@ static int lex_scan_number(lex_t *lex, char c, json_error_t *error) goto out; } } - else /* c != '0' */ { + else if(isdigit(c)) { c = lex_get_save(lex, error); while(isdigit(c)) c = lex_get_save(lex, error); } + else { + lex_unget_unsave(lex, c); + goto out; + } if(c != '.' && c != 'E' && c != 'e') { long value; @@ -864,6 +868,8 @@ json_t *json_load_file(const char *path, json_error_t *error) json_t *result; FILE *fp; + error_init(error); + fp = fopen(path, "r"); if(!fp) { |