* mygetopt.c: fix a parsing issue with short options.
This commit is contained in:
@@ -63,7 +63,7 @@ int mygetopt(int argc, char * const _argv[], const char *optstring,
|
||||
if(tmp[1] == ':')
|
||||
{
|
||||
if(flag[2] != '\0')
|
||||
myoptarg = tmp + 2;
|
||||
myoptarg = flag + 2;
|
||||
else
|
||||
myoptarg = argv[myoptind++];
|
||||
return ret;
|
||||
|
||||
Reference in New Issue
Block a user