mirror of
https://github.com/valitydev/thrift.git
synced 2024-11-07 02:45:22 +00:00
THRIFT-3755 TDebugProtocol::writeString hits assert in isprint on Windows with debug CRT
This closes #960
This commit is contained in:
parent
6657b8337d
commit
3bf5bf9933
@ -347,7 +347,9 @@ uint32_t TDebugProtocol::writeString(const string& str) {
|
||||
output += "\\\\";
|
||||
} else if (*it == '"') {
|
||||
output += "\\\"";
|
||||
} else if (std::isprint(*it)) {
|
||||
// passing characters <0 to std::isprint causes asserts. isprint takes an
|
||||
// int, so we need to be careful of sign extension
|
||||
} else if (std::isprint((unsigned char)*it)) {
|
||||
output += *it;
|
||||
} else {
|
||||
switch (*it) {
|
||||
|
Loading…
Reference in New Issue
Block a user