]> granicus.if.org Git - python/commitdiff
Fix showstopping bug (^ wouldn't match after \n). Jeffrey Ollie.
authorGuido van Rossum <guido@python.org>
Wed, 14 May 1997 18:27:51 +0000 (18:27 +0000)
committerGuido van Rossum <guido@python.org>
Wed, 14 May 1997 18:27:51 +0000 (18:27 +0000)
Modules/regexpr.c

index 90bff874ab48cb704772e6f6e5044f2e87c4e084..87f747fc3ebc2fdad793decee13afa421a81ccc4 100644 (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);