aboutsummaryrefslogtreecommitdiff
path: root/match.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2022-10-27 00:05:30 -0400
committerBruce Hill <bruce@bruce-hill.com>2022-10-27 00:05:30 -0400
commit538706858e328da320bbebfa7e80d04b667599fc (patch)
tree8f9464f05170d49695692bd4ab96de757572ebb9 /match.c
parentf29bf54ffb143631e0c793704e0c2981744d4109 (diff)
Bugfix
Diffstat (limited to 'match.c')
-rw-r--r--match.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/match.c b/match.c
index 1e895a5..cbb5f83 100644
--- a/match.c
+++ b/match.c
@@ -945,13 +945,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->children) {
- for (int i = 0; m->children[i]; i++) {
- match_t *cap = _get_numbered_capture(m->children[i], &n);
- if (cap) return cap;
- }
- }
- return NULL;
+ return _get_numbered_capture(m, &n);
}
//