mirror of
https://github.com/python/cpython.git
synced 2025-12-09 10:37:17 +00:00
use correct base ptr
This commit is contained in:
parent
2844a7a6d3
commit
f3b7d86e25
1 changed files with 2 additions and 1 deletions
|
|
@ -1975,8 +1975,9 @@ _PyUnicode_FindMaxChar(PyObject *unicode, Py_ssize_t start, Py_ssize_t end)
|
||||||
return 127;
|
return 127;
|
||||||
|
|
||||||
kind = PyUnicode_KIND(unicode);
|
kind = PyUnicode_KIND(unicode);
|
||||||
startptr = PyUnicode_DATA(unicode) + start * kind;
|
startptr = PyUnicode_DATA(unicode);
|
||||||
endptr = startptr + end * kind;
|
endptr = startptr + end * kind;
|
||||||
|
startptr += start * kind;
|
||||||
switch(kind) {
|
switch(kind) {
|
||||||
case PyUnicode_1BYTE_KIND:
|
case PyUnicode_1BYTE_KIND:
|
||||||
return ucs1lib_find_max_char(startptr, endptr);
|
return ucs1lib_find_max_char(startptr, endptr);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue