Backport #8210 ยป fix-8210-1.diff
regexec.c | ||
---|---|---|
4012 | 4012 |
start = min_semi_end - reg->anchor_dmax; |
4013 | 4013 |
if (start < end) |
4014 | 4014 |
start = onigenc_get_right_adjust_char_head(reg->enc, str, start); |
4015 |
else { /* match with empty at end */ |
|
4016 |
start = onigenc_get_prev_char_head(reg->enc, str, end); |
|
4017 |
} |
|
4018 | 4015 |
} |
4019 | 4016 |
if ((OnigDistance )(max_semi_end - (range - 1)) < reg->anchor_dmin) { |
4020 | 4017 |
range = max_semi_end - reg->anchor_dmin + 1; |
4021 | 4018 |
} |
4022 | 4019 | |
4023 |
if (start >= range) goto mismatch_no_msa;
|
|
4020 |
if (start > range) goto mismatch_no_msa; |
|
4024 | 4021 |
} |
4025 | 4022 |
else { |
4026 | 4023 |
if ((OnigDistance )(min_semi_end - range) > reg->anchor_dmax) { |