fix bug where getopt_parse returns argc as the first nonopt argument when there are no nonopt arguments
SVN revision: 54861
This commit is contained in:
parent
4a3a740a3a
commit
c6732ad9cc
|
@ -764,7 +764,11 @@ _ecore_getopt_parse_find_nonargs_base(const Ecore_Getopt *parser, int argc, char
|
||||||
dst++;
|
dst++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (base != argc)
|
||||||
memmove(argv + dst, nonargs, used * sizeof(char *));
|
memmove(argv + dst, nonargs, used * sizeof(char *));
|
||||||
|
else
|
||||||
|
/* return 0 since argv[0] is technically the nonargs base */
|
||||||
|
base = 0;
|
||||||
return base;
|
return base;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue