mirror of
https://github.com/python/cpython.git
synced 2025-08-29 13:15:11 +00:00
Fix logic error introduced by 83da67651687.
This commit is contained in:
parent
4d688e3275
commit
e45c0c5cef
1 changed files with 2 additions and 2 deletions
|
@ -9075,12 +9075,12 @@ PyUnicode_Count(PyObject *str,
|
|||
|
||||
kind1 = PyUnicode_KIND(str_obj);
|
||||
kind2 = PyUnicode_KIND(sub_obj);
|
||||
kind = kind2;
|
||||
kind = kind1;
|
||||
buf1 = PyUnicode_DATA(str_obj);
|
||||
buf2 = PyUnicode_DATA(sub_obj);
|
||||
if (kind2 != kind) {
|
||||
if (kind2 > kind)
|
||||
return 0;
|
||||
return 0;
|
||||
buf2 = _PyUnicode_AsKind(sub_obj, kind);
|
||||
}
|
||||
if (!buf2)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue