Fix named captures

This commit is contained in:
Bruce Hill 2020-09-08 00:38:16 -07:00
parent 575019c7e0
commit 63ed89d2b4

1
bpeg.c
View File

@ -744,6 +744,7 @@ static void print_match(match_t *m, const char *color)
fputc('@', stdout);
--r;
} else {
++r;
char *name = strndup(r, (size_t)(closing-r));
cap = get_capture_named(m, name);
free(name);