Skip to content

Commit

Permalink
std::tolower is undefined if the argument's value is neither represen…
Browse files Browse the repository at this point in the history
…table as unsigned char nor equal to EOF (yhirose#761)

Co-authored-by: taoxu <[email protected]>
  • Loading branch information
372046933 and taoxu authored Nov 19, 2020
1 parent e273fec commit e1133a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion httplib.h
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ struct ci {
bool operator()(const std::string &s1, const std::string &s2) const {
return std::lexicographical_compare(
s1.begin(), s1.end(), s2.begin(), s2.end(),
[](char c1, char c2) { return ::tolower(c1) < ::tolower(c2); });
[](unsigned char c1, unsigned char c2) { return ::tolower(c1) < ::tolower(c2); });
}
};

Expand Down

0 comments on commit e1133a2

Please sign in to comment.