about summary refs log tree commit diff
path: root/src/regex/regcomp.c
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2011-06-16 16:53:11 -0400
committerRich Felker <dalias@aerifal.cx>2011-06-16 16:53:11 -0400
commit32aea2087a699bb4bd9c34347b6ef8d164ee0d0b (patch)
tree2bc57c8cda1ba64547a2fa70db677d89882fc831 /src/regex/regcomp.c
parentc7d19f9923c66a2ddb47272f1e8fec8b804f54c4 (diff)
downloadmusl-32aea2087a699bb4bd9c34347b6ef8d164ee0d0b.tar.gz
musl-32aea2087a699bb4bd9c34347b6ef8d164ee0d0b.tar.xz
musl-32aea2087a699bb4bd9c34347b6ef8d164ee0d0b.zip
duplicate re_nsub in LSB/glibc ABI compatible location
Diffstat (limited to 'src/regex/regcomp.c')
-rw-r--r--src/regex/regcomp.c2
1 files changed, 1 insertions, 1 deletions
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