]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix case where you start a new group immediately after a label.
authorGuido van Rossum <guido@python.org>
Wed, 23 Oct 1996 17:53:06 +0000 (17:53 +0000)
committerGuido van Rossum <guido@python.org>
Wed, 23 Oct 1996 17:53:06 +0000 (17:53 +0000)
Thanks to Ka-Ping Yee.

Modules/regexmodule.c

index 6f566c31f1478ab97fc64b61802aae4ad8529189..eb63f3788be7ef77ae9d3514646103f93880b589 100644 (file)
@@ -456,7 +456,7 @@ symcomp(pattern, gdict)
                                *g++ = *o++;
                        }
                }
-               if (*o == '[' && !escaped) {
+               else if (*o == '[' && !escaped) {
                        *n++ = *o;
                        ++o;    /* eat the char following '[' */
                        *n++ = *o;