summaryrefslogtreecommitdiff
path: root/src/apk.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/apk.c')
-rw-r--r--src/apk.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/apk.c b/src/apk.c
index 071d5ae..f4e510f 100644
--- a/src/apk.c
+++ b/src/apk.c
@@ -542,7 +542,7 @@ int main(int argc, char **argv)
applet = deduce_applet(argc, argv);
if (applet && applet->optgroups[0]) optgroups = applet->optgroups;
- for (i = 0, num_options = 0; optgroups[i]; i++)
+ for (i = 0, num_options = 1; optgroups[i]; i++)
num_options += optgroups[i]->num_options;
all_options = alloca(sizeof(struct option) * num_options);
for (i = r = 0; optgroups[i]; r += optgroups[i]->num_options, i++)