diff options
Diffstat (limited to 'Objects/unicodeobject.c')
-rw-r--r-- | Objects/unicodeobject.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 95ecfe2..27492c8 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -1975,8 +1975,9 @@ _PyUnicode_FindMaxChar(PyObject *unicode, Py_ssize_t start, Py_ssize_t end) return 127; kind = PyUnicode_KIND(unicode); - startptr = PyUnicode_DATA(unicode) + start * kind; + startptr = PyUnicode_DATA(unicode); endptr = startptr + end * kind; + startptr += start * kind; switch(kind) { case PyUnicode_1BYTE_KIND: return ucs1lib_find_max_char(startptr, endptr); |