diff --git a/Modules/regexmodule.c b/Modules/regexmodule.c index 6f566c31f14..eb63f3788be 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;