فهرست منبع

fix copy and paste error in regex code causing mishandling of \) in BRE

Rich Felker 13 سال پیش
والد
کامیت
1736148210
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      src/regex/regcomp.c

+ 1 - 1
src/regex/regcomp.c

@@ -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;
 		}