diff options
Diffstat (limited to 'libbb/getopt32.c')
-rw-r--r-- | libbb/getopt32.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/libbb/getopt32.c b/libbb/getopt32.c index b87b835..80f4cc0 100644 --- a/libbb/getopt32.c +++ b/libbb/getopt32.c @@ -379,9 +379,7 @@ getopt32(char **argv, const char *applet_opts, ...) int spec_flgs = 0; /* skip 0: some applets cheat: they do not actually HAVE argv[0] */ - argc = 1; - while (argv[argc]) - argc++; + argc = 1 + string_array_len(argv + 1); va_start(p, applet_opts); |