mirror of
https://github.com/json-c/json-c.git
synced 2026-11-07 22:20:16 +08:00
probably worth an option for this
This commit is contained in:
1 parent
8c847968c7
commit
32d149c8f6
3 files changed
+7
-2
No files matched your search
+1
-1
@@ -562,7 +562,7 @@ static int json_object_double_to_json_string(struct json_object* jso,
|
||||
} else {
|
||||
p = strchr(buf, '.');
|
||||
}
|
||||
if (p) {
|
||||
if (p && (flags & JSON_C_TO_STRING_NOZERO)) {
|
||||
/* last useful digit, always keep 1 zero */
|
||||
p++;
|
||||
for (q=p ; *q ; q++) {
|
||||
|
||||
Reference in new issue
Block a user