From e45c0c5cefaa634ce1bf9efe95523756c60917c7 Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Sat, 12 May 2012 15:49:07 +0200 Subject: Fix logic error introduced by 83da67651687. --- Objects/unicodeobject.c | 4 ++-- 1 file 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) -- cgit v0.12