spot fix #1171: isprint argument must be representable as unsigned char (#1173)

master
Billy Donahue 2020-05-13 18:37:02 -04:00 committed by GitHub
parent e36cff19f0
commit 75b360af4a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -178,7 +178,7 @@ String valueToString(bool value) { return value ? "true" : "false"; }
static bool isAnyCharRequiredQuoting(char const* s, size_t n) {
assert(s || !n);
return std::any_of(s, s + n, [](int c) {
return std::any_of(s, s + n, [](unsigned char c) {
return c == '\\' || c == '"' || !std::isprint(c);
});
}