You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by ms...@apache.org on 2004/02/19 01:30:15 UTC

svn commit: rev 6740 - incubator/spamassassin/trunk/lib/Mail/SpamAssassin

Author: mss
Date: Wed Feb 18 16:30:14 2004
New Revision: 6740

Modified:
   incubator/spamassassin/trunk/lib/Mail/SpamAssassin/PerMsgStatus.pm
Log:
bug 2607: Always round down to make the 5.0!=5.0-phenomenon go away (patch by Dan Kohn).


Modified: incubator/spamassassin/trunk/lib/Mail/SpamAssassin/PerMsgStatus.pm
==============================================================================
--- incubator/spamassassin/trunk/lib/Mail/SpamAssassin/PerMsgStatus.pm	(original)
+++ incubator/spamassassin/trunk/lib/Mail/SpamAssassin/PerMsgStatus.pm	Wed Feb 18 16:30:14 2004
@@ -211,6 +211,13 @@
 
   $self->delete_fulltext_tmpfile();
 
+  # Round the hits down to the nearest 0.1.  Technically, using int
+  # instead of a true floor function rounds up to the nearest 0.1 for
+  # negative numbers, but who really cares.
+  # Fixes bug http://bugzilla.spamassassin.org/show_bug.cgi?id=2607
+  $self->{hits} = int($self->{hits} * 10) / 10;
+
+  
   # Round the hits to 3 decimal places to avoid rounding issues
   # We assume required_hits to be properly rounded already.
   # add 0 to force it back to numeric representation instead of string.