Sync Optparse with the upstream

This commit is contained in:
Ivan Baravy 2023-01-31 02:46:41 +00:00
parent a7cc9c091e
commit 0fdfde2b5b

View File

@ -143,7 +143,7 @@ optparse_init(struct optparse *options, char **argv)
{
options->argv = argv;
options->permute = 1;
options->optind = 1;
options->optind = argv[0] != 0;
options->subopt = 0;
options->optarg = 0;
options->errmsg[0] = '\0';