From e4e63232369e4bd3e68b4e9bdf93b24baa2c9034 Mon Sep 17 00:00:00 2001 From: Thomas Schoebel-Theuer Date: Mon, 4 Nov 2019 19:00:25 +0100 Subject: [PATCH] marsadm: fix warning --- userspace/marsadm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/userspace/marsadm b/userspace/marsadm index 4caa541a..04ef20d7 100755 --- a/userspace/marsadm +++ b/userspace/marsadm @@ -3946,7 +3946,9 @@ sub progress_bar { $max = $mid if $max < $mid; $max = 1 if $max < 1; my $pos1 = $length * $min / $max; - my $bar = '=' x ($pos1 - 1); + my $count = $pos1 - 1; + $count = 0 if $count < 0; + my $bar = '=' x $count; if ($pos1 < $length) { $bar .= ">"; $pos1++;