mirror of
https://github.com/fmtlib/fmt.git
synced 2025-11-28 13:19:48 +01:00
Fix handling of # in width computation
This commit is contained in:
@@ -1925,7 +1925,7 @@ OutputIt write_float(OutputIt out, const DecimalFP& fp,
|
||||
#endif
|
||||
if (fspecs.showpoint) {
|
||||
if (num_zeros <= 0 && fspecs.format != float_format::fixed) num_zeros = 1;
|
||||
if (num_zeros > 0) size += to_unsigned(num_zeros);
|
||||
if (num_zeros > 0) size += to_unsigned(num_zeros) + 1;
|
||||
}
|
||||
return write_padded<align::right>(out, specs, size, [&](iterator it) {
|
||||
if (sign) *it++ = static_cast<Char>(data::signs[sign]);
|
||||
|
||||
Reference in New Issue
Block a user