From: Eric Haszlakiewicz Date: Sun, 24 Dec 2017 19:42:58 +0000 (-0500) Subject: PR#394: fix breakage with VS build. X-Git-Tag: json-c-0.13.1-20180305~8 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a70466ebbf601097f8a87b5f7ed30aa750749673;p=thirdparty%2Fjson-c.git PR#394: fix breakage with VS build. --- diff --git a/json_object.c b/json_object.c index 2971f087..458163c2 100644 --- a/json_object.c +++ b/json_object.c @@ -806,6 +806,7 @@ static int json_object_double_to_json_string_format(struct json_object* jso, else { const char *std_format = "%.17g"; + int format_drops_decimals = 0; if (!format) { @@ -830,7 +831,6 @@ static int json_object_double_to_json_string_format(struct json_object* jso, else p = strchr(buf, '.'); - int format_drops_decimals = 0; if (format == std_format || strstr(format, ".0f") == NULL) format_drops_decimals = 1;