mirror of
https://github.com/fmtlib/fmt.git
synced 2025-11-30 22:29:23 +01:00
Don't remove trailing zeros with #
This commit is contained in:
@@ -1131,7 +1131,7 @@ int format_float(T value, int precision, float_specs specs, buffer<char>& buf) {
|
||||
if (grisu_gen_digits(normalized, 1, exp, handler) == digits::error)
|
||||
return snprintf_float(value, precision, specs, buf);
|
||||
int num_digits = handler.size;
|
||||
if (!fixed) {
|
||||
if (!fixed && !specs.showpoint) {
|
||||
// Remove trailing zeros.
|
||||
while (num_digits > 0 && buf[num_digits - 1] == '0') {
|
||||
--num_digits;
|
||||
|
||||
Reference in New Issue
Block a user