Opened 7 years ago
Closed 5 years ago
#11385 closed Bugs (fixed)
uuid serializes incorrectly if adjustfield left is set
Reported by: | Owned by: | Andy Tompkins | |
---|---|---|---|
Milestone: | Boost 1.62.0 | Component: | uuid |
Version: | Boost 1.57.0 | Severity: | Problem |
Keywords: | Cc: |
Description
If the stream being used has adjustfield left set, any bytes less than 16 seem to be serialized incorrectly. I think this is because the padding of the leading '0' is done to the wrong side. ie 0x08 becomes 0x80
I'm using VS2013 on Windows 7.
As an example:
boost::uuids::uuid uuid = { 0x0a, 0xe0, 0x47, 0x50,
0x0a, 0x0a,
0xeb, 0xec,
0xed, 0xee,
0xfc, 0x08, 0x4d, 0xcf, 0xe7, 0xf5
};
stringstream ss;
ss << left << uuid;
cout << ss.str() << endl;
Outputs: a0e04750-a0a0-ebec-edee-fc804dcfe7f5
instead of 0ae04750-0a0a-ebec-edee-fc084dcfe7f5
Change History (2)
comment:1 by , 7 years ago
comment:2 by , 5 years ago
Milestone: | To Be Determined → Boost 1.62.0 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Pull request was accepted based on this bug report here: https://github.com/boostorg/uuid/pull/12