summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2012-04-23 22:07:01 (GMT)
committerBenjamin Peterson <benjamin@python.org>2012-04-23 22:07:01 (GMT)
commitf3b7d86e25b067ae3b8260df8b58ce55647396cb (patch)
tree933b7bf3996c8a1818da01a4042a607d527f6bec /Objects
parent2844a7a6d346927894222f51e691b783fa5039bd (diff)
downloadcpython-f3b7d86e25b067ae3b8260df8b58ce55647396cb.zip
cpython-f3b7d86e25b067ae3b8260df8b58ce55647396cb.tar.gz
cpython-f3b7d86e25b067ae3b8260df8b58ce55647396cb.tar.bz2
use correct base ptr
Diffstat (limited to 'Objects')
-rw-r--r--Objects/unicodeobject.c3
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);