aboutsummaryrefslogtreecommitdiff
path: root/match.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2022-10-27 12:50:32 -0400
committerBruce Hill <bruce@bruce-hill.com>2022-10-27 12:50:32 -0400
commit951a68f449a6dd82c7a43085bccd8f3f5a4ac3d8 (patch)
treec94fb00d8e411f650c367e1fd1d1305ad48173c5 /match.c
parent2bc0ca739022918a0809b60949a603827112e911 (diff)
Pulling back 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 0ff6243..7e88a3c 100644
--- a/match.c
+++ b/match.c
@@ -912,13 +912,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);
}
//