mirror of
https://github.com/fmtlib/fmt.git
synced 2025-12-01 14:49:33 +01:00
make plus flag for printf not be ignored for char argument (#1683)
* make plus flag for printf not be ignored for char argument * clarify overwriting of alignment specifiers for printf with char argument
This commit is contained in:
@@ -257,7 +257,10 @@ class printf_arg_formatter : public detail::arg_formatter_base<Range> {
|
||||
return (*this)(static_cast<int>(value));
|
||||
fmt_specs.sign = sign::none;
|
||||
fmt_specs.alt = false;
|
||||
fmt_specs.align = align::right;
|
||||
// align::numeric needs to be overwritten here since the '0' flag is
|
||||
// ignored for non-numeric types
|
||||
if (fmt_specs.align == align::none || fmt_specs.align == align::numeric)
|
||||
fmt_specs.align = align::right;
|
||||
return base::operator()(value);
|
||||
} else {
|
||||
return base::operator()(value);
|
||||
|
||||
Reference in New Issue
Block a user