Merge pull request #1450 from pwnall/fix-printers

Fix std::iscntrl use in gtest-printers.cc
This commit is contained in:
Gennadiy Civil 2018-02-15 17:24:19 -05:00 committed by GitHub
commit 3f0cf6b62a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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':