[MOAB-dev] r5186 - MOAB/trunk/src
sjackson at cae.wisc.edu
sjackson at cae.wisc.edu
Thu Oct 6 15:45:44 CDT 2011
Author: sjackson
Date: 2011-10-06 15:45:43 -0500 (Thu, 06 Oct 2011)
New Revision: 5186
Modified:
MOAB/trunk/src/ProgOptions.cpp
Log:
Fix a crash when an unknown option was specified in a chain of short-form flags
Modified: MOAB/trunk/src/ProgOptions.cpp
===================================================================
--- MOAB/trunk/src/ProgOptions.cpp 2011-10-06 17:20:29 UTC (rev 5185)
+++ MOAB/trunk/src/ProgOptions.cpp 2011-10-06 20:45:43 UTC (rev 5186)
@@ -722,7 +722,7 @@
}
else for (size_t f = 1; f < arg.length(); ++f) { // for each short opt
ProgOpt* opt = lookup( short_names, std::string(1,arg[f]) );
- if (opt->flags & int_flag) {
+ if (opt && (opt->flags & int_flag) ) {
const char val[] = { arg[f], 0 };
process_option( opt, std::string(1,arg[f]), val );
}
More information about the moab-dev
mailing list