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.
This commit is contained in:
Eric Haszlakiewicz
2012-04-29 11:04:33 -05:00
parent 31faa49bd8
commit 0cc1db6459

View File

@@ -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)