Commit 695d32fa0c5b28d438ae81ad3c60cb0299e4105e

Authored by unknown
1 parent 81e0d221

David's changes to the argument class.

Showing 1 changed file with 1 additions and 1 deletions   Show diff stats
ui/arguments.h
... ... @@ -417,7 +417,7 @@ namespace stim{
417 417 {
418 418 int i = find(opts.begin(), opts.end(), _name) - opts.begin();
419 419  
420   - if(i < 0)
  420 + if(i < 0 || i >= opts.size())
421 421 {
422 422 std::cout<<"ERROR - Unspecified parameter name: "<<_name<<std::endl;
423 423 exit(1);
... ...