Commit fc4f5037 authored by Guido van Rossum's avatar Guido van Rossum

Fix showstopping bug (^ wouldn't match after \n). Jeffrey Ollie.

parent 34570d76
...@@ -1914,7 +1914,7 @@ int re_search(regexp_t bufp, ...@@ -1914,7 +1914,7 @@ int re_search(regexp_t bufp,
} }
if (anchor == 1) if (anchor == 1)
{ /* anchored to begline */ { /* anchored to begline */
if (pos > 0 && string[pos - 1]) if (pos > 0 && (string[pos - 1] != '\n'))
continue; continue;
} }
assert(pos >= 0 && pos <= size); assert(pos >= 0 && pos <= size);
......
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