1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-28 10:38:45 +00:00

explicitly use unsigned chars (#2423)

Fixes #2106
This commit is contained in:
Charles Kerr 2022-01-17 15:13:22 -06:00 committed by GitHub
parent 3036a76beb
commit f415de0626
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -188,7 +188,7 @@ static bool appendSanitizedComponent(std::string& out, std::string_view in, bool
*setme_is_adjusted = false; *setme_is_adjusted = false;
// remove leading spaces // remove leading spaces
auto constexpr leading_test = [](auto ch) auto constexpr leading_test = [](unsigned char ch)
{ {
return isspace(ch); return isspace(ch);
}; };
@ -196,7 +196,7 @@ static bool appendSanitizedComponent(std::string& out, std::string_view in, bool
in.remove_prefix(std::distance(std::begin(in), it)); in.remove_prefix(std::distance(std::begin(in), it));
// remove trailing spaces and '.' // remove trailing spaces and '.'
auto constexpr trailing_test = [](auto ch) auto constexpr trailing_test = [](unsigned char ch)
{ {
return isspace(ch) || ch == '.'; return isspace(ch) || ch == '.';
}; };