Skip to content

Commit

Permalink
🔀 a branch for #360
Browse files Browse the repository at this point in the history
  • Loading branch information
nlohmann committed Nov 28, 2017
1 parent cc937de commit 0ffa6f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/json.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6697,7 +6697,7 @@ class serializer
}

// get number of digits for a text -> float -> text round-trip
static constexpr auto d = std::numeric_limits<number_float_t>::digits10;
static constexpr auto d = std::numeric_limits<number_float_t>::max_digits10;

// the actual conversion
std::ptrdiff_t len = snprintf(number_buffer.data(), number_buffer.size(), "%.*g", d, x);
Expand Down

0 comments on commit 0ffa6f5

Please sign in to comment.