aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--match.c2
1 files changed, 1 insertions, 1 deletions
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);