diff options
author | Guido van Rossum <guido@python.org> | 1997-05-14 18:27:51 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1997-05-14 18:27:51 (GMT) |
commit | fc4f503762cddab450a2c30bbf5fee3039f92c2e (patch) | |
tree | 8ef145f8706628f57e45e6da23fe18a16118359f /Modules | |
parent | 34570d7669744c69d2b03918b88af8cd9f5b8392 (diff) | |
download | cpython-fc4f503762cddab450a2c30bbf5fee3039f92c2e.zip cpython-fc4f503762cddab450a2c30bbf5fee3039f92c2e.tar.gz cpython-fc4f503762cddab450a2c30bbf5fee3039f92c2e.tar.bz2 |
Fix showstopping bug (^ wouldn't match after \n). Jeffrey Ollie.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/regexpr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/regexpr.c b/Modules/regexpr.c index 90bff87..87f747f 100644 --- a/Modules/regexpr.c +++ b/Modules/regexpr.c @@ -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); |