summaryrefslogtreecommitdiffstats
path: root/Objects/unicodeobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/unicodeobject.c')
-rw-r--r--Objects/unicodeobject.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index 27492c8..7efa939 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -1976,8 +1976,8 @@ _PyUnicode_FindMaxChar(PyObject *unicode, Py_ssize_t start, Py_ssize_t end)
kind = PyUnicode_KIND(unicode);
startptr = PyUnicode_DATA(unicode);
- endptr = startptr + end * kind;
- startptr += start * kind;
+ endptr = (char *)startptr + end * kind;
+ startptr = (char *)startptr + start * kind;
switch(kind) {
case PyUnicode_1BYTE_KIND:
return ucs1lib_find_max_char(startptr, endptr);