fix iterator::end() dereference

This commit is contained in:
Nakasaka, Masato 2026-03-12 01:10:10 -07:00
parent 05039967da
commit fb71f7550a
1 changed files with 1 additions and 1 deletions

View File

@ -102,7 +102,7 @@ std::string regex_to_reversed_partial_regex(const std::string & pattern) {
auto is_star = *it == '*';
++it;
if (is_star) {
if (*it == '?') {
if (it != end && *it == '?') {
++it;
}
}