diff options
author | Guido van Rossum <guido@python.org> | 2000-12-19 02:23:19 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2000-12-19 02:23:19 (GMT) |
commit | cda4f9a8dca961f9047eb6c5cbe647cec507e1a1 (patch) | |
tree | 05801b5311ea0874e73df7d21e8d74380770bad5 /Objects | |
parent | 8b264542734e8e66bfe1153dfd0e9e92e7a5d636 (diff) | |
download | cpython-cda4f9a8dca961f9047eb6c5cbe647cec507e1a1.zip cpython-cda4f9a8dca961f9047eb6c5cbe647cec507e1a1.tar.gz cpython-cda4f9a8dca961f9047eb6c5cbe647cec507e1a1.tar.bz2 |
Fix off-by-one error in split_substring(). Fixes SF bug #122162.
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/unicodeobject.c | 2 |
1 files changed, 1 insertions, 1 deletions
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 @@ 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; |