summaryrefslogtreecommitdiffstats
path: root/Modules/regexmodule.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1992-01-26 18:12:41 (GMT)
committerGuido van Rossum <guido@python.org>1992-01-26 18:12:41 (GMT)
commit2d78590183a93f08e12a33066c12a44012ad67fb (patch)
treee241fa0476912124ffe61539c59f1c217ac58208 /Modules/regexmodule.c
parent598fd8c9800fceecc9da8dd728fb301a4517a03a (diff)
downloadcpython-2d78590183a93f08e12a33066c12a44012ad67fb.zip
cpython-2d78590183a93f08e12a33066c12a44012ad67fb.tar.gz
cpython-2d78590183a93f08e12a33066c12a44012ad67fb.tar.bz2
Make "range" one smaller (discrepancy between doc and source for regex.c!).
Diffstat (limited to 'Modules/regexmodule.c')
-rw-r--r--Modules/regexmodule.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/regexmodule.c b/Modules/regexmodule.c
index 97578a0..1fb3573 100644
--- a/Modules/regexmodule.c
+++ b/Modules/regexmodule.c
@@ -134,7 +134,7 @@ reg_search(re, args)
err_setstr(RegexError, "search offset out of range");
return NULL;
}
- range = size - offset + 1;
+ range = size - offset;
re->re_regs_valid = 0;
result = re_search(&re->re_patbuf, buffer, size, offset, range,
&re->re_regs);