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:
Oswald Buddenhagen 2008-02-23 09:18:42 +00:00
parent a365e20660
commit 2f62a7f608

View File

@ -234,8 +234,10 @@ main( int argc, char **argv )
memset( mvars, 0, sizeof(*mvars) );
mvars->t[1] = 1;
for (mvars->oind = 1, ochar = 0; mvars->oind < argc; ) {
for (mvars->oind = 1, ochar = 0; ; ) {
if (!ochar || !*ochar) {
if (mvars->oind >= argc)
break;
if (argv[mvars->oind][0] != '-')
break;
if (argv[mvars->oind][1] == '-') {