From 3296ce42d9c97d24ee753c3ce911db75cfe01296 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Thu, 27 Oct 2022 20:23:51 -0400 Subject: Fix for numbered capture logic --- match.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'match.c') diff --git a/match.c b/match.c index 71ab087..6602f45 100644 --- a/match.c +++ b/match.c @@ -923,7 +923,7 @@ static match_t *_get_numbered_capture(match_t *m, int *n) match_t *get_numbered_capture(match_t *m, int n) { if (n <= 0) return m; - if (m->pat->type == BP_TAGGED) { + if (m->pat->type == BP_TAGGED || m->pat->type == BP_CAPTURE) { if (m->children) { for (int i = 0; m->children[i]; i++) { match_t *cap = _get_numbered_capture(m->children[i], &n); -- cgit v1.2.3