forked from enlightenment/efl
more correctly fix no-option parsing to still parse when no non-arg options are found
SVN revision: 54862
This commit is contained in:
parent
c6732ad9cc
commit
a1c347ecd5
|
@ -1638,7 +1638,6 @@ ecore_getopt_parse(const Ecore_Getopt *parser, Ecore_Getopt_Value *values, int a
|
||||||
else
|
else
|
||||||
prog = parser->prog;
|
prog = parser->prog;
|
||||||
|
|
||||||
if (argc == 1) return 0;
|
|
||||||
nonargs = _ecore_getopt_parse_find_nonargs_base(parser, argc, argv);
|
nonargs = _ecore_getopt_parse_find_nonargs_base(parser, argc, argv);
|
||||||
if (nonargs < 0)
|
if (nonargs < 0)
|
||||||
goto error;
|
goto error;
|
||||||
|
@ -1647,7 +1646,7 @@ ecore_getopt_parse(const Ecore_Getopt *parser, Ecore_Getopt_Value *values, int a
|
||||||
nonargs = argc;
|
nonargs = argc;
|
||||||
|
|
||||||
i = 1;
|
i = 1;
|
||||||
while (i < nonargs)
|
while ((i < nonargs ? nonargs : argc) && (argv[i]))
|
||||||
if (!_ecore_getopt_parse_arg(parser, values, argc, argv, &i, &nonargs))
|
if (!_ecore_getopt_parse_arg(parser, values, argc, argv, &i, &nonargs))
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue