aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--googletest/src/gtest-printers.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/googletest/src/gtest-printers.cc b/googletest/src/gtest-printers.cc
index fe70edcf..d55a5e9b 100644
--- a/googletest/src/gtest-printers.cc
+++ b/googletest/src/gtest-printers.cc
@@ -357,8 +357,10 @@ void PrintTo(const wchar_t* s, ostream* os) {
namespace {
bool ContainsUnprintableControlCodes(const char* str, size_t length) {
+ const unsigned char *s = reinterpret_cast<const unsigned char *>(str);
+
for (size_t i = 0; i < length; i++) {
- char ch = *str++;
+ unsigned char ch = *s++;
if (std::iscntrl(ch)) {
switch (ch) {
case '\t':