isprint() wants value in range [-1, 255]
The MSVC impl. assert()s this
This commit is contained in:
@@ -497,7 +497,7 @@ std::ostream& operator<<(std::ostream& strm, const escape& Q)
|
||||
case '\'': next = '\''; break;
|
||||
case '\"': next = '\"'; if(Q.S==escape::CSV) quote = '"'; break;
|
||||
default:
|
||||
if(!isprint(C)) {
|
||||
if(!isprint((unsigned char)C)) {
|
||||
// print three charator escape
|
||||
strm<<"\\x"<<hexdigit(C>>4)<<hexdigit(C);
|
||||
} else {
|
||||
@@ -534,7 +534,7 @@ std::ostream& operator<<(std::ostream& strm, const maybeQuote& q)
|
||||
esc = true;
|
||||
break;
|
||||
default:
|
||||
if(!isprint(q.s[i])) {
|
||||
if(!isprint((unsigned char)q.s[i])) {
|
||||
esc = true;
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user