Commit c721eee5 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(regex_compile): Fix end-of-pattern case for space.

parent 33b3f667
2004-12-05 Richard M. Stallman <rms@gnu.org>
* regex.c (regex_compile): Fix end-of-pattern case for space.
2004-12-03 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
 
* macterm.h (cfstring_create_with_utf8_cstring): Add prototype.
......
......@@ -2558,8 +2558,8 @@ regex_compile (pattern, size, syntax, bufp)
}
/* 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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment