Mercurial > emacs
changeset 58780:7f1f68f88ae8
(regex_compile): Fix end-of-pattern case for space.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sun, 05 Dec 2004 23:34:16 +0000 |
parents | 79df48a5db35 |
children | c3c9f14d7c2b |
files | src/regex.c |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/regex.c Sun Dec 05 23:28:40 2004 +0000 +++ b/src/regex.c Sun Dec 05 23:34:16 2004 +0000 @@ -2558,8 +2558,8 @@ } /* If the spaces are followed by a repetition op, treat them normally. */ - if (p1 == pend - || (*p1 == '*' || *p1 == '+' || *p1 == '?' + if (p1 != pend + && (*p1 == '*' || *p1 == '+' || *p1 == '?' || (*p1 == '\\' && p1 + 1 != pend && p1[1] == '{'))) goto normal_char;