Skip to content

Commit 055f984

Browse files
committed
MsgPack: Added fix for sticky std::hex (see msgpack/msgpack-c#533)
1 parent 0adeb7d commit 055f984

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/msgpack/object.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -747,7 +747,9 @@ inline std::ostream& operator<< (std::ostream& s, const msgpack::object& o)
747747
default: {
748748
unsigned int code = static_cast<unsigned int>(c);
749749
if (code < 0x20 || code == 0x7f) {
750+
std::ios::fmtflags flags(s.flags());
750751
s << "\\u" << std::hex << std::setw(4) << std::setfill('0') << (code & 0xff);
752+
s.flags(flags);
751753
}
752754
else {
753755
s << c;

0 commit comments

Comments
 (0)