nikhilgupta10 / GridLAB-D

Other
1 stars 0 forks source link

#923 cmdarg processing fails when --option=data is used, #2649

Open nikhilgupta10 opened 7 years ago

nikhilgupta10 commented 7 years ago

The loop does not catch command options that use = signs. The loop in *core/cmdarg.c:cmdarg_load(int argc,char argv[])** needs to test options as follows:

        for ( i=0 ; i<sizeof(main)/sizeof(main[0]) ; i++ )
        {
            CMDARG arg = main[i];
            char tmp[1024];
            sprintf(tmp,\%s=\,arg.lopt);
            if ( ( arg.sopt && strncmp(*argv,\-\,1)==0 && strcmp((*argv)+1,arg.sopt)==0 ) ||
                 ( arg.lopt && strncmp(*argv,\--\,2)==0 && strcmp((*argv)+2,arg.lopt)==0 ) ||
                 ( arg.lopt && strncmp(*argv,\--\,2)==0 && strncmp((*argv)+2,tmp,strlen(tmp))==0 ) )
            {
                int n = arg.call(argc,argv);
~~~~~,
nikhilgupta10 commented 7 years ago

nikhilgupta10 imported these comments from Sourceforge: The user dchassin does not exist anymore. Therefore assigning this to afisher1. "dchassin":- status: new --> assigned