diff options
author | Remi Collet <fedora@famillecollet.com> | 2012-11-27 11:06:49 +0100 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2012-11-27 11:06:49 +0100 |
commit | 16a4a32e294e80ca8c89ec83e62baa0c59947ac9 (patch) | |
tree | 2a705cee088e2f9767e32765e07066bafb5faf2f /json_tokener.c | |
parent | f6b27cbb6cd2797641e71247e59299d771f13530 (diff) |
float parsing must be locale independent
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; |