Skip to content

Commit 98a75bb

Browse files
authored
Merge pull request #6 from mysterywolf/master
同步上游 https://github.com/skeeto/optparse/commit/cdc96b235343c8cf647548…
2 parents 4722bc8 + b43e6a5 commit 98a75bb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

optparse.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ void optparse_init(struct optparse *options, char **argv)
139139
{
140140
options->argv = argv;
141141
options->permute = 1;
142-
options->optind = 1;
142+
options->optind = argv[0] != 0;
143143
options->subopt = 0;
144144
options->optarg = 0;
145145
options->errmsg[0] = '\0';

0 commit comments

Comments
 (0)