This commit is contained in:
Stephen Miller 2026-02-28 23:30:19 -06:00 committed by GitHub
parent 6a8c50c3a2
commit dbf23a66af
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -330,7 +330,7 @@ static bool match(std::string_view str, std::string_view pattern) {
auto pat_it = pattern.begin();
while (str_it != str.end() && pat_it != pattern.end()) {
if (*pat_it == '%') { // 0 or more wildcard
for (auto str_wild_it = str_it; str_wild_it <= str.end(); ++str_wild_it) {
for (auto str_wild_it = str_it; str_wild_it < str.end(); ++str_wild_it) {
if (match({str_wild_it, str.end()}, {pat_it + 1, pattern.end()})) {
return true;
}