Changeset 31 for cli.hpp


Ignore:
Timestamp:
May 4, 2012, 10:16:32 AM (5 years ago)
Author:
freek.de.bruijn@…
Message:

Check whether option 1 or 2 are given before using them in CLI constructor.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cli.hpp

    r29 r31  
    3939        opt.processCommandArgs(argc, argv);
    4040
    41         if (strcmp(opt.getValue('1'),"true")) ms1profile = true;
    42         if (strcmp(opt.getValue('2'),"true")) ms2profile = true;
    43 
     41        if ((opt.getValue('1') != NULL) && strcmp(opt.getValue('1'), "true")) ms1profile = true;
     42        if ((opt.getValue('2') != NULL) && strcmp(opt.getValue('2'), "true")) ms2profile = true;
    4443    }
    4544
Note: See TracChangeset for help on using the changeset viewer.