mirror of https://github.com/python/cpython
Fix showstopping bug (^ wouldn't match after \n). Jeffrey Ollie.
This commit is contained in:
parent
34570d7669
commit
fc4f503762
|
@ -1914,7 +1914,7 @@ int re_search(regexp_t bufp,
|
|||
}
|
||||
if (anchor == 1)
|
||||
{ /* anchored to begline */
|
||||
if (pos > 0 && string[pos - 1])
|
||||
if (pos > 0 && (string[pos - 1] != '\n'))
|
||||
continue;
|
||||
}
|
||||
assert(pos >= 0 && pos <= size);
|
||||
|
|
Loading…
Reference in New Issue