mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2025-05-15 01:08:27 +00:00
std::tolower is undefined if the argument's value is neither representable as unsigned char nor equal to EOF (#761)
Co-authored-by: taoxu <taoxu@bilibili.com>
This commit is contained in:
parent
e273fec93c
commit
e1133a2dcb
1 changed files with 1 additions and 1 deletions
|
@ -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); });
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue