From 0fdfde2b5b790951db40f5f206862db67b840554 Mon Sep 17 00:00:00 2001 From: Ivan Baravy Date: Tue, 31 Jan 2023 02:46:41 +0000 Subject: [PATCH] Sync Optparse with the upstream --- optparse.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/optparse.h b/optparse.h index f96184a..8d6c0a9 100644 --- a/optparse.h +++ b/optparse.h @@ -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';