[Avida-SVN] r1091 - development/source/tools
brysonda at myxo.css.msu.edu
brysonda at myxo.css.msu.edu
Mon Nov 20 13:15:27 PST 2006
Author: brysonda
Date: 2006-11-20 16:15:27 -0500 (Mon, 20 Nov 2006)
New Revision: 1091
Modified:
development/source/tools/cArgSchema.h
Log:
cArgSchema was trying to delete an uninitialized default string. Check if optional and ignore.
Modified: development/source/tools/cArgSchema.h
===================================================================
--- development/source/tools/cArgSchema.h 2006-11-20 21:00:08 UTC (rev 1090)
+++ development/source/tools/cArgSchema.h 2006-11-20 21:15:27 UTC (rev 1091)
@@ -42,7 +42,7 @@
: name(in_name), type(SCHEMA_DOUBLE), index(in_idx), optional(true), def_double(def) { ; }
sArgSchemaEntry(const cString& in_name, int in_idx, cString* def) // Optional String Argument
: name(in_name), type(SCHEMA_STRING), index(in_idx), optional(true), def_string(def) { ; }
- ~sArgSchemaEntry() { if (type == SCHEMA_STRING) delete def_string; } // Cleanup string object
+ ~sArgSchemaEntry() { if (type == SCHEMA_STRING && optional) delete def_string; } // Cleanup string object
};
More information about the Avida-cvs
mailing list