You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tre/SOURCES/tre-issue50.patch

13 lines
724 B

diff -up tre-c2f5d130c91b1696385a6ae0b5bcfd5214bcc9ca/lib/tre-parse.c.issue50 tre-c2f5d130c91b1696385a6ae0b5bcfd5214bcc9ca/lib/tre-parse.c
--- tre-c2f5d130c91b1696385a6ae0b5bcfd5214bcc9ca/lib/tre-parse.c.issue50 2019-02-23 17:36:40.940463693 +0100
+++ tre-c2f5d130c91b1696385a6ae0b5bcfd5214bcc9ca/lib/tre-parse.c 2019-02-23 18:40:41.111544430 +0100
@@ -1341,7 +1341,7 @@ tre_parse(tre_parse_ctx_t *ctx)
case CHAR_RPAREN: /* end of current subexpression */
if ((ctx->cflags & REG_EXTENDED && depth > 0)
- || (ctx->re > ctx->re_start
+ || (!(ctx->cflags & REG_EXTENDED) && ctx->re > ctx->re_start
&& *(ctx->re - 1) == CHAR_BACKSLASH))
{
DPRINT(("tre_parse: empty: '%.*" STRF "'\n",