From 47e3e1097e09da7f973908e09df15e3bb7c5e1f4 Mon Sep 17 00:00:00 2001 From: Luca Barbato Date: Wed, 15 Oct 2014 02:43:30 +0200 Subject: cmdutils: Use the correct guard The OptionDef arrays are terminated with a { NULL } element not NULL. CC: libav-stable@libav.org Bug-Id: CID 703769 --- cmdutils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmdutils.c') 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; -- cgit v1.2.3