Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7cc95f5

Browse files
authored
Fix wrong assert in unicodeobject (GH-5340)
1 parent 4defba3 commit 7cc95f5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Objects/unicodeobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11038,7 +11038,7 @@ _PyUnicode_EqualToASCIIId(PyObject *left, _Py_Identifier *right)
1103811038
if (PyUnicode_CHECK_INTERNED(left))
1103911039
return 0;
1104011040

11041-
assert(_PyUnicode_HASH(right_uni) != 1);
11041+
assert(_PyUnicode_HASH(right_uni) != -1);
1104211042
hash = _PyUnicode_HASH(left);
1104311043
if (hash != -1 && hash != _PyUnicode_HASH(right_uni))
1104411044
return 0;

0 commit comments

Comments
 (0)