summaryrefslogtreecommitdiff
path: root/dev-libs/tre/files/tre-issue50.patch
blob: f233953ce28fcc06474d7fa1448625513fac3384 (plain)
1
2
3
4
5
6
7
8
9
10
11
--- 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",