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

This commit is contained in:
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

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);
});
}