mirror of
https://github.com/CrowCpp/Crow.git
synced 2026-01-18 16:31:17 +01:00
C++ 17 related fix, using DBL_DECIMAL_DIG instead of DECIMAL_DIG
This commit is contained in:
@@ -1876,9 +1876,9 @@ namespace crow // NOTE: Already documented in "crow/app.h"
|
||||
if (v.nt == num_type::Double_precision_floating_point)
|
||||
{
|
||||
#ifdef _MSC_VER
|
||||
sprintf_s(outbuf, sizeof(outbuf), "%.*g", DECIMAL_DIG, v.num.d);
|
||||
sprintf_s(outbuf, sizeof(outbuf), "%.*g", DBL_DECIMAL_DIG, v.num.d);
|
||||
#else
|
||||
snprintf(outbuf, sizeof(outbuf), "%.*g", DECIMAL_DIG, v.num.d);
|
||||
snprintf(outbuf, sizeof(outbuf), "%.*g", DBL_DECIMAL_DIG, v.num.d);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user