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

This commit is contained in:
Guido van Rossum 1997-05-14 18:27:51 +00:00
parent 34570d7669
commit fc4f503762
1 changed files with 1 additions and 1 deletions

View File

@ -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);