mirror of
https://github.com/python/cpython.git
synced 2025-08-30 05:35:08 +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);
|
kind1 = PyUnicode_KIND(str_obj);
|
||||||
kind2 = PyUnicode_KIND(sub_obj);
|
kind2 = PyUnicode_KIND(sub_obj);
|
||||||
kind = kind2;
|
kind = kind1;
|
||||||
buf1 = PyUnicode_DATA(str_obj);
|
buf1 = PyUnicode_DATA(str_obj);
|
||||||
buf2 = PyUnicode_DATA(sub_obj);
|
buf2 = PyUnicode_DATA(sub_obj);
|
||||||
if (kind2 != kind) {
|
if (kind2 != kind) {
|
||||||
if (kind2 > kind)
|
if (kind2 > kind)
|
||||||
return 0;
|
return 0;
|
||||||
buf2 = _PyUnicode_AsKind(sub_obj, kind);
|
buf2 = _PyUnicode_AsKind(sub_obj, kind);
|
||||||
}
|
}
|
||||||
if (!buf2)
|
if (!buf2)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue