aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--match.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/match.c b/match.c
index 4eca7cb..6c55fbc 100644
--- a/match.c
+++ b/match.c
@@ -890,9 +890,12 @@ static match_t *_get_numbered_capture(match_t *m, int *n)
return NULL;
if ((m->pat->type == BP_CAPTURE && m->pat->args.capture.namelen == 0) || m->pat->type == BP_TAGGED) {
- if (*n == 1) return m;
- else return NULL;
- // --(*n);
+ if (*n == 1) {
+ return m;
+ } else {
+ --(*n);
+ return NULL;
+ }
}
if (m->children) {
for (int i = 0; m->children[i]; i++) {