summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2011-01-13 08:12:54 +0000
committerPaul Buetow <paul@buetow.org>2011-01-13 08:12:54 +0000
commit468b451c99a7ada0020253fdb3e18091fa58e850 (patch)
tree459a96658328dbfabddc25ef628ed3fe7b59bb30
parent1bbf914976c58d506261653ab4c633787e97fc0c (diff)
fixed division by zero bug
removed a debugging message
-rwxr-xr-xloadbars.pl4
1 files 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;