Issue #486: append a missing ".0" to negative double values too.
This commit is contained in:
1 parent
3e81b4abe3
commit
485f2a02c7
3 files changed
+13
-3
No files matched your search
@@ -74,4 +74,8 @@ int main()
|
||||
printf("ERROR: json_c_set_serialization_double_format() failed");
|
||||
|
||||
json_object_put(obj);
|
||||
|
||||
obj = json_object_new_double(-12.0);
|
||||
printf("obj(-12.0).to_string(default format)=%s\n", json_object_to_json_string(obj));
|
||||
|
||||
}
|
||||
@@ -16,3 +16,4 @@ obj(12.0).to_string(default format)=12.0
|
||||
obj(12.0).to_string(%.0f)=12
|
||||
obj(12.0).to_string(%.0g)=1e+01
|
||||
obj(12.0).to_string(%.1g)=12.0
|
||||
obj(-12.0).to_string(default format)=-12.0
|
||||
Reference in new issue
Block a user