From 468b451c99a7ada0020253fdb3e18091fa58e850 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Thu, 13 Jan 2011 08:12:54 +0000 Subject: fixed division by zero bug removed a debugging message --- loadbars.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/loadbars.pl b/loadbars.pl index 9748209..ba2e1ff 100755 --- a/loadbars.pl +++ b/loadbars.pl @@ -313,7 +313,6 @@ sub graph_stats ($) { } elsif ($MSG == MSG_TOGGLE_SUMMARY) { $display_summary = $CONF{togglesummary}; - say "$display_summary = $CONF{togglesummary};"; } $recv_msg = 1; @@ -337,7 +336,8 @@ sub graph_stats ($) { } if ($display_summary) { - $width = $CONF{width} / ($num_stats -1) - 1; + my $div = $width = $num_stats -1; + $width = $CONF{width} / ($div ? $div : 1) - 1; my %summary; my $count = 0; -- cgit v1.2.3