aboutsummaryrefslogtreecommitdiffstats
path: root/include/crow/json.h
diff options
context:
space:
mode:
authorJaeseung Ha <ipknhama@gmail.com>2017-09-17 18:29:52 +0900
committerGitHub <noreply@github.com>2017-09-17 18:29:52 +0900
commitc32aae4b5f4f8b6e9b63463103eca3546bdb44f9 (patch)
tree69af04bef0ff1f81b8f458fa05802a69cbacefa5 /include/crow/json.h
parenta3b9c11112856ccc28e90e95feed568efadf3cae (diff)
parent366e7c7e4b09096874d712696e79a913c17dd2c3 (diff)
downloadcrow-c32aae4b5f4f8b6e9b63463103eca3546bdb44f9.tar.gz
crow-c32aae4b5f4f8b6e9b63463103eca3546bdb44f9.zip
Merge pull request #183 from philave/vs2015-compilation-fix
MS VS2015 compilation fix.
Diffstat (limited to 'include/crow/json.h')
-rw-r--r--include/crow/json.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/crow/json.h b/include/crow/json.h
index 8b58180..e2d116c 100644
--- a/include/crow/json.h
+++ b/include/crow/json.h
@@ -1394,7 +1394,12 @@ namespace crow
case type::Number:
{
char outbuf[128];
+#ifdef _MSC_VER
+ sprintf_s(outbuf, 128, "%g", v.d);
+#else
sprintf(outbuf, "%g", v.d);
+#endif
+
out += outbuf;
}
break;