don't overlook 2nd and later single-letter options in last argument.
reported by fedora -REF: <1197916586.13945.120.camel@localhost.localdomain>
This commit is contained in:
parent
a365e20660
commit
2f62a7f608
|
@ -234,8 +234,10 @@ main( int argc, char **argv )
|
||||||
memset( mvars, 0, sizeof(*mvars) );
|
memset( mvars, 0, sizeof(*mvars) );
|
||||||
mvars->t[1] = 1;
|
mvars->t[1] = 1;
|
||||||
|
|
||||||
for (mvars->oind = 1, ochar = 0; mvars->oind < argc; ) {
|
for (mvars->oind = 1, ochar = 0; ; ) {
|
||||||
if (!ochar || !*ochar) {
|
if (!ochar || !*ochar) {
|
||||||
|
if (mvars->oind >= argc)
|
||||||
|
break;
|
||||||
if (argv[mvars->oind][0] != '-')
|
if (argv[mvars->oind][0] != '-')
|
||||||
break;
|
break;
|
||||||
if (argv[mvars->oind][1] == '-') {
|
if (argv[mvars->oind][1] == '-') {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user