Make "range" one smaller (discrepancy between doc and source for regex.c!).

This commit is contained in:
Guido van Rossum 1992-01-26 18:12:41 +00:00
parent 598fd8c980
commit 2d78590183
1 changed files with 1 additions and 1 deletions

View File

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