You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by jm...@apache.org on 2009/01/14 23:05:08 UTC
svn commit: r734530 - /spamassassin/trunk/masses/rule-qa/automc/ruleqa.cgi
Author: jm
Date: Wed Jan 14 14:05:08 2009
New Revision: 734530
URL: http://svn.apache.org/viewvc?rev=734530&view=rev
Log:
avoid a div by zero
Modified:
spamassassin/trunk/masses/rule-qa/automc/ruleqa.cgi
Modified: spamassassin/trunk/masses/rule-qa/automc/ruleqa.cgi
URL: http://svn.apache.org/viewvc/spamassassin/trunk/masses/rule-qa/automc/ruleqa.cgi?rev=734530&r1=734529&r2=734530&view=diff
==============================================================================
--- spamassassin/trunk/masses/rule-qa/automc/ruleqa.cgi (original)
+++ spamassassin/trunk/masses/rule-qa/automc/ruleqa.cgi Wed Jan 14 14:05:08 2009
@@ -1321,7 +1321,7 @@
# normalize to [0,100] and set default to 0
my @ycoords_s = map { sprintf "%.2f", (100/$max_y) * ($chart{'spam'}{$_}||0) } @idxes;
my @ycoords_h = map { sprintf "%.2f", (100/$max_y) * ($chart{'ham'}{$_}||0) } @idxes;
- my @xcoords = map { sprintf "%.2f", (100/$max_x) * $_ } @idxes;
+ my @xcoords = map { sprintf "%.2f", (100/($max_x||0.0001)) * $_ } @idxes;
my $xgrid = (100/($max_x||0.0001)) * 5;
my $ygrid = (100/($max_y||0.0001)) * 10;