aboutsummaryrefslogtreecommitdiff
path: root/bpeg.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2020-09-08 00:38:16 -0700
committerBruce Hill <bruce@bruce-hill.com>2020-09-08 00:38:16 -0700
commit63ed89d2b4eae0abebc1e79b0fd06dea260333e6 (patch)
treecb9c3523f71cb0841c6be5bb705a18acd7ac31fe /bpeg.c
parent575019c7e0b72be3c205ac03f520e160e4d84248 (diff)
Fix named captures
Diffstat (limited to 'bpeg.c')
-rw-r--r--bpeg.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/bpeg.c b/bpeg.c
index 8594f13..85d372c 100644
--- a/bpeg.c
+++ b/bpeg.c
@@ -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);