Mercurial > cpython-lru_cache-weakref
diff Objects/unicodeobject.c @ 76511:8dbcedfd13f8
use correct base ptr
| author | Benjamin Peterson <benjamin@python.org> |
|---|---|
| date | Mon, 23 Apr 2012 18:07:01 -0400 |
| parents | a9ddade7eb97 |
| children | de0b6e0d8cb9 |
line wrap: on
line diff
--- a/Objects/unicodeobject.c Mon Apr 23 18:00:25 2012 -0400 +++ b/Objects/unicodeobject.c Mon Apr 23 18:07:01 2012 -0400 @@ -1975,8 +1975,9 @@ 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);
