diff options
author | Philip <phil.avdeev@gmail.com> | 2016-10-21 18:22:24 +0300 |
---|---|---|
committer | Philip <phil.avdeev@gmail.com> | 2016-10-21 18:22:24 +0300 |
commit | 366e7c7e4b09096874d712696e79a913c17dd2c3 (patch) | |
tree | e05c2a21e10c7dcc03bd0a3194684bed4bcf7d7f /include/crow/json.h | |
parent | 4e39b23e455e455f1878b3e68d729a1737f3e431 (diff) | |
download | crow-366e7c7e4b09096874d712696e79a913c17dd2c3.tar.gz crow-366e7c7e4b09096874d712696e79a913c17dd2c3.zip |
MS VS2015 compilation fix. It’s better to use native Win32 (strncpy_s, sprintf_s) to avoid compilation errors when building by MS C++.
Diffstat (limited to 'include/crow/json.h')
-rw-r--r-- | include/crow/json.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/crow/json.h b/include/crow/json.h index 891fedf..35f9068 100644 --- a/include/crow/json.h +++ b/include/crow/json.h @@ -1377,7 +1377,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; |