Files
gentoo/dev-libs/tre/files/tre-issue50.patch
Alessandro Barbieri 93098055bb dev-libs/tre: add 0.8.0_p20210321
Closes: https://bugs.gentoo.org/296813
Closes: https://github.com/gentoo/gentoo/pull/24577
Signed-off-by: Patrice Clement <monsieurp@gentoo.org>
Signed-off-by: Alessandro Barbieri <lssndrbarbieri@gmail.com>
2022-03-21 23:06:07 +01:00

12 lines
419 B
Diff

--- a/lib/tre-parse.c
+++ b/lib/tre-parse.c
@@ -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",