diff options
| author | Stefan Monnier | 2023-09-26 11:43:51 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2023-09-26 11:43:51 -0400 |
| commit | e88be844bf774b336ab67995e435416328b53776 (patch) | |
| tree | d937036da59671bcde1c1bff176c31605db47b74 /src | |
| parent | 215bfb24dd0de9ba2c82aea330cbb27985ad6eae (diff) | |
| download | emacs-e88be844bf774b336ab67995e435416328b53776.tar.gz emacs-e88be844bf774b336ab67995e435416328b53776.zip | |
regex.c (mutually_exclusive_p): Fix initial value of `loop_beg`
* src/regex-emacs.c (mutually_exclusive_p): Don't pretend that pattern
position 0 has been checked already.
* test/src/regex-emacs-tests.el (regexp-tests-backtrack-optimization):
Add a corresponding regression test plus some other related tests
I had around.
Diffstat (limited to 'src')
| -rw-r--r-- | src/regex-emacs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/regex-emacs.c b/src/regex-emacs.c index cf7b704ee95..338323cf79e 100644 --- a/src/regex-emacs.c +++ b/src/regex-emacs.c | |||
| @@ -3941,7 +3941,7 @@ static bool | |||
| 3941 | mutually_exclusive_p (struct re_pattern_buffer *bufp, re_char *p1, | 3941 | mutually_exclusive_p (struct re_pattern_buffer *bufp, re_char *p1, |
| 3942 | re_char *p2) | 3942 | re_char *p2) |
| 3943 | { | 3943 | { |
| 3944 | return mutually_exclusive_aux (bufp, p1, p2, bufp->buffer, NULL); | 3944 | return mutually_exclusive_aux (bufp, p1, p2, bufp->buffer - 1, NULL); |
| 3945 | } | 3945 | } |
| 3946 | 3946 | ||
| 3947 | /* Matching routines. */ | 3947 | /* Matching routines. */ |