From 67588d37a1fcdaed2ffdac55feaea26e488537d4 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Mon, 2 Nov 2015 15:02:39 +0100 Subject: [PATCH] =?utf8?q?Form->format=5Famount:=20Warnung=20=C3=BCber=20n?= =?utf8?q?egativen=20repeat=20count=20vermeiden?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Warnung erscheint, wenn bei Konstrukten wie »'str' x $anzahl« die $anzahl negativ ist. --- SL/Form.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SL/Form.pm b/SL/Form.pm index c59669c41..c29097289 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -839,7 +839,7 @@ sub format_amount { if ($places || $p[1]) { $amount .= $d[0] . ( $p[1] || '' ) - . (0 x (abs($places || 0) - length ($p[1]||''))); # pad the fraction + . (0 x max(abs($places || 0) - length ($p[1]||''), 0)); # pad the fraction } $amount = do { -- 2.20.1