fix copy and paste error in regex code causing mishandling of \) in BRE
authorRich Felker <dalias@aerifal.cx>
Mon, 7 May 2012 21:50:32 +0000 (17:50 -0400)
committerRich Felker <dalias@aerifal.cx>
Mon, 7 May 2012 21:50:32 +0000 (17:50 -0400)
src/regex/regcomp.c

index 5f119d1..c72f7d6 100644 (file)
@@ -1186,7 +1186,7 @@ tre_parse(tre_parse_ctx_t *ctx)
                  ctx->re++;
                  goto lparen;
                }
-             if (!(ctx->cflags & REG_EXTENDED) && *(ctx->re + 1) == CHAR_LPAREN)
+             if (!(ctx->cflags & REG_EXTENDED) && *(ctx->re + 1) == CHAR_RPAREN)
                {
                  goto empty_atom;
                }