[vlc-devel] [PATCH] gestures: fix: allow gesture to be triggered

Rémi Denis-Courmont remi at remlab.net
Sun Mar 8 12:09:10 CET 2015


Le vendredi 06 mars 2015, 20:14:21 Zoran Turalija a écrit :
> ---
>  modules/control/gestures.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/modules/control/gestures.c b/modules/control/gestures.c
> index 2b40fc4..e928928 100644
> --- a/modules/control/gestures.c
> +++ b/modules/control/gestures.c
> @@ -410,8 +410,7 @@ static int MovedEvent( vlc_object_t *p_this, char const
> *psz_var, {
>              p_sys->i_last_x = newval.coords.x;
>              p_sys->i_last_y = newval.coords.y;
> -            if( p_sys->i_num_gestures > 0
> -             && gesture( p_sys->i_pattern, p_sys->i_num_gestures - 1 )
> +            if( gesture( p_sys->i_pattern, p_sys->i_num_gestures - 1 )

I think this is UB.

>                      != pattern )
>              {
>                  p_sys->i_pattern |= pattern << ( p_sys->i_num_gestures * 4
> );

-- 
Rémi Denis-Courmont
http://www.remlab.net/




More information about the vlc-devel mailing list