Skip to content

Commit e1133a2

Browse files
372046933taoxu
andauthored
std::tolower is undefined if the argument's value is neither representable as unsigned char nor equal to EOF (yhirose#761)
Co-authored-by: taoxu <[email protected]>
1 parent e273fec commit e1133a2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

httplib.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ struct ci {
271271
bool operator()(const std::string &s1, const std::string &s2) const {
272272
return std::lexicographical_compare(
273273
s1.begin(), s1.end(), s2.begin(), s2.end(),
274-
[](char c1, char c2) { return ::tolower(c1) < ::tolower(c2); });
274+
[](unsigned char c1, unsigned char c2) { return ::tolower(c1) < ::tolower(c2); });
275275
}
276276
};
277277

0 commit comments

Comments
 (0)