From dc107898b2524aef8854483480df7fcca7a7e7ce Mon Sep 17 00:00:00 2001 From: Michael Sullivan Date: Thu, 23 Aug 2012 12:48:08 -0700 Subject: Fix logging code to not sign extend chars being printed in hex. --- src/rt/rust_shape.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/rt/rust_shape.cpp') diff --git a/src/rt/rust_shape.cpp b/src/rt/rust_shape.cpp index ae578081164..8ad36af4ed2 100644 --- a/src/rt/rust_shape.cpp +++ b/src/rt/rust_shape.cpp @@ -394,7 +394,8 @@ log::walk_string2(const std::pair &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; -- cgit 1.4.1-3-g733a5