diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2012-05-12 13:49:07 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2012-05-12 13:49:07 (GMT) |
commit | e45c0c5cefaa634ce1bf9efe95523756c60917c7 (patch) | |
tree | 3c3ff759ac5c9adadbd86acd23487e5806b87ac2 /Objects | |
parent | 4d688e3275d5a10e2321571392cdc31945bb8a89 (diff) | |
download | cpython-e45c0c5cefaa634ce1bf9efe95523756c60917c7.zip cpython-e45c0c5cefaa634ce1bf9efe95523756c60917c7.tar.gz cpython-e45c0c5cefaa634ce1bf9efe95523756c60917c7.tar.bz2 |
Fix logic error introduced by 83da67651687.
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/unicodeobject.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 9db87be..97de48f 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -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) |