mirror of
https://github.com/nlohmann/json.git
synced 2026-05-16 11:15:31 +00:00
Fix for printing long doubles bug in dump_float (#3929)
This commit is contained in:
@@ -19828,7 +19828,7 @@ class serializer
|
||||
static int snprintf_float(char* buf, std::size_t size, int d, long double x)
|
||||
{
|
||||
// NOLINTNEXTLINE(cppcoreguidelines-pro-type-vararg,hicpp-vararg)
|
||||
return (std::snprintf)(buf, size, "%.*lg", d, x);
|
||||
return (std::snprintf)(buf, size, "%.*Lg", d, x);
|
||||
}
|
||||
|
||||
void dump_float(number_float_t x, std::false_type /*is_ieee_single_or_double*/)
|
||||
|
||||
Reference in New Issue
Block a user