]> granicus.if.org Git - python/commitdiff
Fix wrong assert in unicodeobject (GH-5340)
authorINADA Naoki <methane@users.noreply.github.com>
Sat, 27 Jan 2018 17:07:09 +0000 (02:07 +0900)
committerGitHub <noreply@github.com>
Sat, 27 Jan 2018 17:07:09 +0000 (02:07 +0900)
Objects/unicodeobject.c

index 4b90cc364b8c02af4e39bcef3b02ee9eaccf85e4..775bd15cf6d160ff50ca8567ff7d9d8134f7325a 100644 (file)
@@ -11038,7 +11038,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;