Fix off-by-one error in split_substring(). Fixes SF bug #122162.

This commit is contained in:
Guido van Rossum 2000-12-19 02:23:19 +00:00
parent 8b26454273
commit cda4f9a8dc
1 changed files with 1 additions and 1 deletions

View File

@ -2925,7 +2925,7 @@ PyObject *split_substring(PyUnicodeObject *self,
int sublen = substring->length;
PyObject *str;
for (i = j = 0; i < len - sublen; ) {
for (i = j = 0; i <= len - sublen; ) {
if (Py_UNICODE_MATCH(self, i, substring)) {
if (maxcount-- <= 0)
break;