]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue #28727: Fix typo in pattern_richcompare()
authorVictor Stinner <victor.stinner@gmail.com>
Tue, 22 Nov 2016 14:23:00 +0000 (15:23 +0100)
committerVictor Stinner <victor.stinner@gmail.com>
Tue, 22 Nov 2016 14:23:00 +0000 (15:23 +0100)
Typo catched by Serhiy Storchaka, thanks!

Modules/_sre.c

index c1e9fa6e6bd4fc9088957df838d54271986c1930..1b7741696d0dad8d9611c5088e0374e1b89d09bf 100644 (file)
@@ -2688,7 +2688,7 @@ pattern_richcompare(PyObject *lefto, PyObject *righto, int op)
 
     cmp = (left->flags == right->flags
            && left->isbytes == right->isbytes
-           && left->codesize && right->codesize);
+           && left->codesize == right->codesize);
     if (cmp) {
         /* Compare the code and the pattern because the same pattern can
            produce different codes depending on the locale used to compile the