mirror of
https://github.com/python/cpython.git
synced 2025-12-04 08:34:25 +00:00
Fix showstopping bug (^ wouldn't match after \n). Jeffrey Ollie.
This commit is contained in:
parent
34570d7669
commit
fc4f503762
1 changed files with 1 additions and 1 deletions
|
|
@ -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);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue