X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fregex%2Fregcomp.c;h=875f56fd8f8c93f6438696f800d4e33bd7c673e9;hb=8c6fc860a97f79146bf5c092d5cfb90fa6d9355a;hp=3307942ed643c93fef196bc83ef7ab068927a75d;hpb=0b44a0315b47dd8eced9f3b7f31580cf14bbfc01;p=musl diff --git a/src/regex/regcomp.c b/src/regex/regcomp.c index 3307942e..875f56fd 100644 --- a/src/regex/regcomp.c +++ b/src/regex/regcomp.c @@ -3115,7 +3115,7 @@ tre_compile(regex_t *preg, const tre_char_t *regex, size_t n, int cflags) errcode = tre_parse(&parse_ctx); if (errcode != REG_OK) ERROR_EXIT(errcode); - preg->re_nsub = parse_ctx.submatch_id - 1; + preg->re_nsub = preg->__nsub2 = parse_ctx.submatch_id - 1; tree = parse_ctx.result; #ifdef TRE_DEBUG