Skip to content

Commit 11c444a

Browse files
committed
fix: Fix possible invalid iterator usage in string_utils::iequals
1 parent 8d72114 commit 11c444a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

include/logpp/utils/string.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,11 @@ namespace logpp
1818
inline bool iequals(std::string_view lhs, std::string_view rhs)
1919
{
2020
return std::equal(
21-
std::begin(lhs), std::end(lhs), std::begin(rhs),
21+
std::begin(lhs), std::end(lhs),
22+
std::begin(rhs), std::end(rhs),
2223
[](char c1, char c2) {
2324
return std::tolower(c1) == std::tolower(c2);
24-
});
25+
});
2526
}
2627

2728
inline std::optional<size_t> parseSize(std::string_view str)

0 commit comments

Comments
 (0)