aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2021-01-12 20:01:46 -0800
committerBruce Hill <bruce@bruce-hill.com>2021-01-12 20:01:46 -0800
commit88219f49965c61b116da9f022bd04546d414fe17 (patch)
tree9a923cf212b29eae39674794434e31e66127cfcd
parent8144ae5dc941cce599889c0feb15ecceb9e4f878 (diff)
Bugfix for $(echo '1,2,3,' | bp -p '+int % `,')
-rw-r--r--vm.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/vm.c b/vm.c
index 9452f79..bcc33bd 100644
--- a/vm.c
+++ b/vm.c
@@ -220,6 +220,7 @@ static match_t *_match(def_t *defs, file_t *f, const char *str, vm_op_t *op, uns
}
match_t *p = _match(defs, f, str, op->args.repetitions.repeat_pat, flags, rec);
if (p == NULL) {
+ str = start;
destroy_match(&sep);
break;
}