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