[Avida-SVN] r2768 - development/source/main

baer at myxo.css.msu.edu baer at myxo.css.msu.edu
Thu Sep 4 12:35:06 PDT 2008


Author: baer
Date: 2008-09-04 15:35:05 -0400 (Thu, 04 Sep 2008)
New Revision: 2768

Modified:
   development/source/main/cStats.cc
Log:

Trac info: refs #14 closes #14

Initialize resource_geometry array to GLOBAL before the first update.  This
pervents the code from crashing in certain cases. 



Modified: development/source/main/cStats.cc
===================================================================
--- development/source/main/cStats.cc	2008-09-02 22:14:25 UTC (rev 2767)
+++ development/source/main/cStats.cc	2008-09-04 19:35:05 UTC (rev 2768)
@@ -169,6 +169,9 @@
   resource_count.Resize( m_world->GetNumResources() );
   resource_count.SetAll(0);
 
+  resource_geometry.Resize( m_world->GetNumResources() );
+  resource_geometry.SetAll(nGeometry::GLOBAL);
+
   task_names.Resize(num_tasks);
   for (int i = 0; i < num_tasks; i++)
     task_names[i] = env.GetTask(i).GetDesc();




More information about the Avida-cvs mailing list