diff src/regex.c @ 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 829390516ec0
children 5f1c0193e984
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;