marsadm: fix warning

This commit is contained in:
Thomas Schoebel-Theuer 2019-11-04 19:00:25 +01:00
parent b1e82a6aaf
commit e4e6323236
1 changed files with 3 additions and 1 deletions

View File

@ -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++;