mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-05-25 22:44:05 +02:00
Merge pull request #533 from Kronuz/patch-1
Save the flags of the stream
This commit is contained in:
commit
2f34d22bf5
@ -813,7 +813,9 @@ inline std::ostream& operator<< (std::ostream& s, const msgpack::object& o)
|
||||
default: {
|
||||
unsigned int code = static_cast<unsigned int>(c);
|
||||
if (code < 0x20 || code == 0x7f) {
|
||||
std::ios::fmtflags flags(s.flags());
|
||||
s << "\\u" << std::hex << std::setw(4) << std::setfill('0') << (code & 0xff);
|
||||
s.flags(flags);
|
||||
}
|
||||
else {
|
||||
s << c;
|
||||
|
Loading…
x
Reference in New Issue
Block a user