mirror of
https://github.com/fmtlib/fmt.git
synced 2025-11-26 20:30:06 +01:00
Fixed arg_formatter_base::write_pointer to not mutate the format specs.
This fixes cases where arg_formatters are reused, like with arg_join.
This commit is contained in:
committed by
Victor Zverovich
parent
6cd666100f
commit
ca31ca13f1
@@ -1431,9 +1431,10 @@ class arg_formatter_base {
|
||||
}
|
||||
|
||||
void write_pointer(const void *p) {
|
||||
specs_.flags_ = HASH_FLAG;
|
||||
specs_.type_ = 'x';
|
||||
writer_.write_int(reinterpret_cast<uintptr_t>(p), specs_);
|
||||
format_specs specs = specs_;
|
||||
specs.flags_ = HASH_FLAG;
|
||||
specs.type_ = 'x';
|
||||
writer_.write_int(reinterpret_cast<uintptr_t>(p), specs);
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
Reference in New Issue
Block a user