Make # handling consistent with std::format

This commit is contained in:
Victor Zverovich
2023-02-26 10:15:16 -08:00
parent 48dfbcaa95
commit 98699719f8
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -2631,7 +2631,7 @@ FMT_CONSTEXPR20 auto do_write_float(OutputIt out, const DecimalFP& f,
abort_fuzzing_if(num_zeros > 5000);
if (fspecs.showpoint) {
++size;
if (num_zeros <= 0 && fspecs.format != float_format::fixed) num_zeros = 1;
if (num_zeros <= 0 && fspecs.format != float_format::fixed) num_zeros = 0;
if (num_zeros > 0) size += to_unsigned(num_zeros);
}
auto grouping = Grouping(loc, fspecs.locale);