[Avida-cvs] [avida-svn] r970 - trunk/source/tools
jclune at myxo.css.msu.edu
jclune at myxo.css.msu.edu
Thu Sep 21 11:34:19 PDT 2006
Author: jclune
Date: 2006-09-21 14:34:19 -0400 (Thu, 21 Sep 2006)
New Revision: 970
Modified:
trunk/source/tools/cMerit.cc
Log:
Fixed bug where if merit whent below one it crashed by setting all merits below 1 to 0.
Modified: trunk/source/tools/cMerit.cc
===================================================================
--- trunk/source/tools/cMerit.cc 2006-09-21 00:32:28 UTC (rev 969)
+++ trunk/source/tools/cMerit.cc 2006-09-21 18:34:19 UTC (rev 970)
@@ -19,8 +19,8 @@
static double mult[max_bits];
static bool mult_initilalized = false;
- // Do not allow negative merits.
- if (in_value < 0.0) in_value = 0.0;
+ // Do not allow negative merits. If less than 1, set to 0.
+ if (in_value < 1.0) in_value = 0.0;
// Initilize multipliers only once
if( mult_initilalized == false ){
More information about the Avida-cvs
mailing list