diff --git a/httplib.h b/httplib.h index b8a3ed9..c312f9e 100644 --- a/httplib.h +++ b/httplib.h @@ -1463,9 +1463,10 @@ inline std::string encode_query_param(const std::string &value) { escaped.fill('0'); escaped << std::hex; - for (char const &c : value) { - if (std::isalnum(c) || c == '-' || c == '_' || c == '.' || c == '!' || - c == '~' || c == '*' || c == '\'' || c == '(' || c == ')') { + for (auto c : value) { + if (std::isalnum(static_cast(c)) || c == '-' || c == '_' || + c == '.' || c == '!' || c == '~' || c == '*' || c == '\'' || c == '(' || + c == ')') { escaped << c; } else { escaped << std::uppercase;