]> granicus.if.org Git - python/commitdiff
ready the correct string
authorBenjamin Peterson <benjamin@python.org>
Mon, 2 Jan 2012 15:07:38 +0000 (09:07 -0600)
committerBenjamin Peterson <benjamin@python.org>
Mon, 2 Jan 2012 15:07:38 +0000 (09:07 -0600)
Objects/unicodeobject.c

index 98deeda8c7fad3d732bcc9d74b56de620d55024b..e152e732a48fd756a4a555ecf8c8536f045a9bbe 100644 (file)
@@ -9139,7 +9139,7 @@ PyUnicode_Count(PyObject *str,
         Py_DECREF(str_obj);
         return -1;
     }
-    if (PyUnicode_READY(substr) == -1 || PyUnicode_READY(str_obj) == -1) {
+    if (PyUnicode_READY(sub_obj) == -1 || PyUnicode_READY(str_obj) == -1) {
         Py_DECREF(substr);
         Py_DECREF(str_obj);
         return -1;