# HG changeset patch # User Richard M. Stallman # Date 1102289656 0 # Node ID 7f1f68f88ae82ca08e27dc15635a88465b6ffdde # Parent 79df48a5db35d3187e4aeaab69c17ad600c915cd (regex_compile): Fix end-of-pattern case for space. diff -r 79df48a5db35 -r 7f1f68f88ae8 src/regex.c --- 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;