summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmdutils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmdutils.c b/cmdutils.c
index 96b40f31a6..eff011c7ce 100644
--- a/cmdutils.c
+++ b/cmdutils.c
@@ -414,7 +414,7 @@ int locate_option(int argc, char **argv, const OptionDef *options,
(po->name && !strcmp(optname, po->name)))
return i;
- if (!po || po->flags & HAS_ARG)
+ if (!po->name || po->flags & HAS_ARG)
i++;
}
return 0;