From: Guido van Rossum Date: Wed, 23 Oct 1996 17:53:06 +0000 (+0000) Subject: Fix case where you start a new group immediately after a label. X-Git-Tag: v1.4~27 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0cbaff440dffafab29f9b83eb47dd73733a0df2f;p=thirdparty%2FPython%2Fcpython.git Fix case where you start a new group immediately after a label. Thanks to Ka-Ping Yee. --- diff --git a/Modules/regexmodule.c b/Modules/regexmodule.c index 6f566c31f147..eb63f3788be7 100644 --- a/Modules/regexmodule.c +++ b/Modules/regexmodule.c @@ -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;