commit | cda4f9a8dca961f9047eb6c5cbe647cec507e1a1 | [log] [tgz] |
---|---|---|
author | Guido van Rossum <guido@python.org> | Tue Dec 19 02:23:19 2000 +0000 |
committer | Guido van Rossum <guido@python.org> | Tue Dec 19 02:23:19 2000 +0000 |
tree | 05801b5311ea0874e73df7d21e8d74380770bad5 | |
parent | 8b264542734e8e66bfe1153dfd0e9e92e7a5d636 [diff] |
Fix off-by-one error in split_substring(). Fixes SF bug #122162.
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 5ee72bd..4438e89 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c
@@ -2925,7 +2925,7 @@ 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;