Browse code

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

Luca Barbato authored on 2014/10/15 09:43:30
Showing 1 changed files
... ...
@@ -414,7 +414,7 @@ int locate_option(int argc, char **argv, const OptionDef *options,
414 414
              (po->name && !strcmp(optname, po->name)))
415 415
             return i;
416 416
 
417
-        if (!po || po->flags & HAS_ARG)
417
+        if (!po->name || po->flags & HAS_ARG)
418 418
             i++;
419 419
     }
420 420
     return 0;