On Fri, Jul 29, 2011 at 04:48:17PM +0200, Anton Khirnov wrote:
> ---
>  cmdutils.c |    5 ++++-
>  1 files changed, 4 insertions(+), 1 deletions(-)
> 
> diff --git a/cmdutils.c b/cmdutils.c
> index 42be7db..e62b11b 100644
> --- a/cmdutils.c
> +++ b/cmdutils.c
> @@ -141,8 +141,11 @@ void show_help_options(const OptionDef *options, const 
> char *msg, int mask, int
>  }
>  
>  static const OptionDef* find_option(const OptionDef *po, const char *name){
> +    const char *p = strchr(name, ':');
> +    int len = p ? p - name : strlen(name);
> +
>      while (po->name != NULL) {
> -        if (!strcmp(name, po->name))
> +        if (!strncmp(name, po->name, len) && strlen(po->name) == len)
>              break;
>          po++;
>      }
> -- 

lgtm
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to