diff options
Diffstat (limited to 'json_tokener.c')
-rw-r--r-- | json_tokener.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/json_tokener.c b/json_tokener.c index f5fa8d6..85c530b 100644 --- a/json_tokener.c +++ b/json_tokener.c @@ -585,7 +585,7 @@ struct json_object* json_tokener_parse_ex(struct json_tokener *tok, double numd; if (!tok->is_double && json_parse_int64(tok->pb->buf, &num64) == 0) { current = json_object_new_int64(num64); - } else if(tok->is_double && sscanf(tok->pb->buf, "%lf", &numd) == 1) { + } else if(tok->is_double && json_parse_double(tok->pb->buf, &numd) == 0) { current = json_object_new_double(numd); } else { tok->err = json_tokener_error_parse_number; |