about summary refs log tree commit diff
path: root/src/rt/rust_shape.cpp
diff options
context:
space:
mode:
authorMichael Sullivan <sully@msully.net>2012-08-23 12:48:08 -0700
committerMichael Sullivan <sully@msully.net>2012-08-23 12:48:08 -0700
commitdc107898b2524aef8854483480df7fcca7a7e7ce (patch)
tree2a93e11465bddc15bc52c42efcbab08e9468d355 /src/rt/rust_shape.cpp
parent3cf74564b8fbe1a5a179333a533851815879ff46 (diff)
downloadrust-dc107898b2524aef8854483480df7fcca7a7e7ce.tar.gz
rust-dc107898b2524aef8854483480df7fcca7a7e7ce.zip
Fix logging code to not sign extend chars being printed in hex.
Diffstat (limited to 'src/rt/rust_shape.cpp')
-rw-r--r--src/rt/rust_shape.cpp3
1 files changed, 2 insertions, 1 deletions
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<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;