Fix logic error introduced by 83da67651687.

This commit is contained in:
Antoine Pitrou 2012-05-12 15:49:07 +02:00
parent 4d688e3275
commit e45c0c5cef
1 changed files with 2 additions and 2 deletions

View File

@ -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)