backport: don't overlook 2nd and later single-letter options in last

argument.
This commit is contained in:
Oswald Buddenhagen 2008-02-23 09:22:06 +00:00
parent 1b9b5f8bfd
commit e161af47bb

View File

@ -178,8 +178,10 @@ main( int argc, char **argv )
} }
arc4_init(); arc4_init();
for (oind = 1, ochar = 0; oind < argc; ) { for (oind = 1, ochar = 0; ; ) {
if (!ochar || !*ochar) { if (!ochar || !*ochar) {
if (oind >= argc)
break;
if (argv[oind][0] != '-') if (argv[oind][0] != '-')
break; break;
if (argv[oind][1] == '-') { if (argv[oind][1] == '-') {