From 23198f8ddd02de07a09770f0352b719af38a9fb2 Mon Sep 17 00:00:00 2001 From: Pauli Jaakkola Date: Thu, 12 Nov 2020 18:16:40 +0200 Subject: [PATCH] Fix boundless repeat (don't ignore `sep` and overflow stack). --- src/net/cgrand/seqexp.clj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/net/cgrand/seqexp.clj b/src/net/cgrand/seqexp.clj index 7db8bb2..8df9305 100644 --- a/src/net/cgrand/seqexp.clj +++ b/src/net/cgrand/seqexp.clj @@ -131,7 +131,7 @@ "Matches its body min to max times (inclusive) separated by sep. Exists in greedy (repeat') and reluctant (repeat'?) variants." ([n sep e] - (repeat' n n e)) + (repeat' n n sep e)) ([min max sep e] (cond (pos? min) (cat e (repeat (dec min) (dec max) (cat sep e)))