mirror of
https://github.com/valitydev/thrift.git
synced 2024-11-07 10:48:51 +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 += "\\\\";
|
output += "\\\\";
|
||||||
} else if (*it == '"') {
|
} else if (*it == '"') {
|
||||||
output += "\\\"";
|
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;
|
output += *it;
|
||||||
} else {
|
} else {
|
||||||
switch (*it) {
|
switch (*it) {
|
||||||
|
Loading…
Reference in New Issue
Block a user