[Avida-SVN] r2788 - development/source/actions

brysonda at myxo.css.msu.edu brysonda at myxo.css.msu.edu
Sun Sep 14 19:36:58 PDT 2008


Author: brysonda
Date: 2008-09-14 22:36:57 -0400 (Sun, 14 Sep 2008)
New Revision: 2788

Modified:
   development/source/actions/LandscapeActions.cc
Log:
Add a distance check to FullLandscape, ensuring that it issues an error if invalid distances are specified.

Modified: development/source/actions/LandscapeActions.cc
===================================================================
--- development/source/actions/LandscapeActions.cc	2008-09-15 02:26:53 UTC (rev 2787)
+++ development/source/actions/LandscapeActions.cc	2008-09-15 02:36:57 UTC (rev 2788)
@@ -227,6 +227,11 @@
     int update = -1;
     cLandscape* land = NULL;
     
+    if (m_dist < 1) {
+      m_world->GetDriver().RaiseException("landscape distance must be >= 1");
+      return;
+    }
+    
     if (ctx.GetAnalyzeMode()) {
       if (m_world->GetVerbosity() >= VERBOSE_ON) {
         cString msg("Full Landscaping batch ");




More information about the Avida-cvs mailing list