From 596c64136aaf576d09b9ed5bdc9f92ff4843a24e Mon Sep 17 00:00:00 2001 From: Juerd Waalboer Date: Tue, 30 Aug 2022 20:40:55 +0200 Subject: [PATCH] Fix pfand/repeat If both plugins were loaded at the same time, nothing would still work. --- plugins/repeat | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/repeat b/plugins/repeat index 1932796..4cb87fe 100644 --- a/plugins/repeat +++ b/plugins/repeat @@ -12,11 +12,11 @@ my $limit = 200; my $err_limit = "Repetition is limited at $limit items."; sub command($self, $cart, $command, @) { - return ABORT, $err_pfand if $cart->entries('is_pfand'); - my ($lhs, $op, $rhs) = $command =~ /^(\d+)?([x*+-])(\d+)?$/ or return NEXT; + return ABORT, $err_pfand if $cart->entries('is_pfand'); + my $last = ($cart->entries)[-1]; return NEXT if $lhs and $rhs; # 123x123 -> invalid syntax