From 75b360af4ae3949c003e39d57dad43238e3178c2 Mon Sep 17 00:00:00 2001 From: Billy Donahue Date: Wed, 13 May 2020 18:37:02 -0400 Subject: [PATCH] spot fix #1171: isprint argument must be representable as unsigned char (#1173) --- src/lib_json/json_writer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib_json/json_writer.cpp b/src/lib_json/json_writer.cpp index cb528b8..56ee65e 100644 --- a/src/lib_json/json_writer.cpp +++ b/src/lib_json/json_writer.cpp @@ -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); }); }