]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Retract the rage bugfix, but change the range assertion.
authorGuido van Rossum <guido@python.org>
Sun, 26 Jan 1992 18:23:48 +0000 (18:23 +0000)
committerGuido van Rossum <guido@python.org>
Sun, 26 Jan 1992 18:23:48 +0000 (18:23 +0000)
Modules/regexpr.c

index c7693482cebf868e6a74fe658cfed2b28002d994..137e41d150a1f3cfd1ffbf2e00edd6fc8c4c5893 100644 (file)
@@ -1379,7 +1379,7 @@ regexp_registers_t regs;
   char anchor;
   
   assert(size1 >= 0 && size2 >= 0 && pos >= 0 && mstop >= 0);
-  assert(pos + range + 1 >= 0 && pos + range - 1 <= size1 + size2);
+  assert(pos + range >= 0 && pos + range <= size1 + size2); /* Bugfix by ylo */
   assert(pos <= mstop);
   
   fastmap = bufp->fastmap;
@@ -1396,6 +1396,7 @@ regexp_registers_t regs;
     }
   else
     dir = 1;
+  /* range--; /* Bugfix by Guido */
   if (anchor == 2)
     if (pos != 0)
       return -1;