aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2022-10-27 20:23:51 -0400
committerBruce Hill <bruce@bruce-hill.com>2022-10-27 20:23:51 -0400
commit3296ce42d9c97d24ee753c3ce911db75cfe01296 (patch)
tree581141ab5765dfa36006b59d99a1ea5bd7e748ad
parent69740ed659fd8aae986bc2f269ee100a579b5efd (diff)
Fix for numbered capture logic
-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);