Changeset 13619


Ignore:
Timestamp:
10/11/12 09:38:16 (13 years ago)
Author:
Mathieu Morlighem
Message:

BUG: check number of arguments BEFORE getting them

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/solutions/ProcessArguments.cpp

    r13306 r13619  
    1919        char *rootpatharg    = NULL;
    2020
    21         *solution_type=StringToEnumx(argv[1]);
     21        /*Check input arguments*/
    2222        if(argc<2)_error_("Usage error: no solution requested");
    2323        if(argc<3)_error_("Usage error: missing execution directory");
    2424        if(argc<4)_error_("Usage error: missing model name");
     25
     26        /*Get requested solution*/
     27        *solution_type=StringToEnumx(argv[1]);
    2528
    2629        rootpatharg=argv[2];
Note: See TracChangeset for help on using the changeset viewer.