]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix wrong assert in unicodeobject (GH-5340)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sat, 27 Jan 2018 17:41:24 +0000 (09:41 -0800)
committerINADA Naoki <methane@users.noreply.github.com>
Sat, 27 Jan 2018 17:41:24 +0000 (02:41 +0900)
(cherry picked from commit 7cc95f5069c8983afb8a55928db6956abe2d5afa)

Objects/unicodeobject.c

index 86cac96cd620bd080606bbbaa4ae0bf2d95ce109..9ccd06eebb4808fa0ffd91b345ca3ebcddfec164 100644 (file)
@@ -11217,7 +11217,7 @@ _PyUnicode_EqualToASCIIId(PyObject *left, _Py_Identifier *right)
     if (PyUnicode_CHECK_INTERNED(left))
         return 0;
 
-    assert(_PyUnicode_HASH(right_uni) != 1);
+    assert(_PyUnicode_HASH(right_uni) != -1);
     hash = _PyUnicode_HASH(left);
     if (hash != -1 && hash != _PyUnicode_HASH(right_uni))
         return 0;