diff --git a/src/json.hpp b/src/json.hpp index 8d545a93..739f3540 100644 --- a/src/json.hpp +++ b/src/json.hpp @@ -6684,7 +6684,7 @@ class basic_json static constexpr auto d = std::numeric_limits::digits10; // the actual conversion - auto written_bytes = snprintf(m_buf.data(), m_buf.size(), "%.*g", d, x); + long written_bytes = snprintf(m_buf.data(), m_buf.size(), "%.*g", d, x); // negative value indicates an error assert(written_bytes > 0); diff --git a/src/json.hpp.re2c b/src/json.hpp.re2c index b14fb68d..a55792c5 100644 --- a/src/json.hpp.re2c +++ b/src/json.hpp.re2c @@ -6684,7 +6684,7 @@ class basic_json static constexpr auto d = std::numeric_limits::digits10; // the actual conversion - auto written_bytes = snprintf(m_buf.data(), m_buf.size(), "%.*g", d, x); + long written_bytes = snprintf(m_buf.data(), m_buf.size(), "%.*g", d, x); // negative value indicates an error assert(written_bytes > 0);