Fix logging code to not sign extend chars being printed in hex.

This commit is contained in:
Michael Sullivan 2012-08-23 12:48:08 -07:00
parent 3cf74564b8
commit dc107898b2

View File

@ -394,7 +394,8 @@ log::walk_string2(const std::pair<ptr,ptr> &data) {
if (isprint(ch)) {
out << ch;
} else if (ch) {
out << "\\x" << std::setw(2) << std::setfill('0') << (int)ch;
out << "\\x" << std::setw(2) << std::setfill('0')
<< (unsigned int)(unsigned char)ch;
}
}
++subdp;