separate project repository
[barcat.git] / graph
diff --git a/graph b/graph
index 096586e9e04547e1c59d6db804f938a7e28124db..501ac3c24f4ce3a86585c785537320ce3eb532a2 100755 (executable)
--- a/graph
+++ b/graph
@@ -5,7 +5,7 @@ use utf8;
 use List::Util qw( min max sum );
 use open qw( :std :utf8 );
 
-our $VERSION = '1.00';
+our $VERSION = '1.01';
 
 use Getopt::Long '2.33', qw( :config gnu_getopt );
 sub podexit { require Pod::Usage; Pod::Usage::pod2usage(-exitval => 0, @_) }
@@ -61,7 +61,7 @@ for my $nr (0 .. $#lines) {
                print "\e[0m" if $color;
        }
        printf '%-*s', $len, $lines[$nr];
-       print $barmark[$_] // '-' for 1 .. (($val || 0) - $minval) * $size;
+       print $barmark[$_] // '-' for 1 .. $size && (($val || 0) - $minval) * $size;
        say '';
 }