From 302bfa11e7f8886f9f54d6c82ed34c8e4140cbae Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sun, 23 Oct 2022 00:34:20 -0400 Subject: Bugfix --- match.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/match.c b/match.c index 4eca7cb..6c55fbc 100644 --- a/match.c +++ b/match.c @@ -890,9 +890,12 @@ static match_t *_get_numbered_capture(match_t *m, int *n) return NULL; if ((m->pat->type == BP_CAPTURE && m->pat->args.capture.namelen == 0) || m->pat->type == BP_TAGGED) { - if (*n == 1) return m; - else return NULL; - // --(*n); + if (*n == 1) { + return m; + } else { + --(*n); + return NULL; + } } if (m->children) { for (int i = 0; m->children[i]; i++) { -- cgit v1.2.3