]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Stefans bugfix for incorrect double comparison - bug 797
authorrobertc <>
Thu, 16 Oct 2003 19:14:49 +0000 (19:14 +0000)
committerrobertc <>
Thu, 16 Oct 2003 19:14:49 +0000 (19:14 +0000)
src/StatHist.cc

index 497598f9a5e21450cdcab1b232d41ddb5eb216e5..b700c6e911ede37ef8fe2eb4353638959dad86b6 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: StatHist.cc,v 1.30 2003/02/21 22:50:06 robertc Exp $
+ * $Id: StatHist.cc,v 1.31 2003/10/16 13:14:49 robertc Exp $
  *
  * DEBUG: section 62    Generic Histogram
  * AUTHOR: Duane Wessels
@@ -118,7 +118,7 @@ statHistCopy(StatHist * Dest, const StatHist * Orig)
     debug(62, 3) ("statHistCopy: max %f %f\n", Dest->max, Orig->max);
     assert(Dest->max == Orig->max);
     debug(62, 3) ("statHistCopy: scale %f %f\n", Dest->scale, Orig->scale);
-    assert(Dest->scale == Orig->scale);
+    assert(fabs(Dest->scale - Orig->scale) < 0.0000001);
     assert(Dest->val_in == Orig->val_in);
     assert(Dest->val_out == Orig->val_out);
     /* actual copy */