diff options
author | Eric Haszlakiewicz <erh+git@nimenees.com> | 2012-04-29 11:04:33 -0500 |
---|---|---|
committer | Eric Haszlakiewicz <erh+git@nimenees.com> | 2012-04-29 11:04:33 -0500 |
commit | 0cc1db6459035fd071371281daff030e5a0e9b8e (patch) | |
tree | a37cbfc865650581fcc798a04584bf70230e37be | |
parent | 31faa49bd8ce3a6335ae313990e69572808a96a2 (diff) | |
download | json-c-0cc1db6459035fd071371281daff030e5a0e9b8e.tar.gz |
Change the format used for sprintbuf (but not scanf) to use %f instead of %lf because the "l" is unnecessary and some compilers behave differently with it present (e.g. MinGW).
Thanks for Mateusz Loskot for the fix.
-rw-r--r-- | json_object.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/json_object.c b/json_object.c index 825630f..5a35938 100644 --- a/json_object.c +++ b/json_object.c @@ -463,7 +463,7 @@ static int json_object_double_to_json_string(struct json_object* jso, int level, int flags) { - return sprintbuf(pb, "%lf", jso->o.c_double); + return sprintbuf(pb, "%f", jso->o.c_double); } struct json_object* json_object_new_double(double d) |