This commit is contained in:
Bruce Hill 2022-10-23 00:34:20 -04:00
parent 5db008dbd2
commit 302bfa11e7

View File

@ -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++) {