common: Fix parsing SS control string

It's not possible to be both greater than '9' and less than '0'. This
would lead to accepting things like "#$33#" as activation and "*$33#" as
deactivation, even though the string makes no sense.
This commit is contained in:
Lucas De Marchi 2013-05-22 18:28:38 -03:00 committed by Denis Kenzior
parent 816b6946f7
commit 53a0fa8c7c
1 changed files with 1 additions and 1 deletions

View File

@ -554,7 +554,7 @@ gboolean parse_ss_control_string(char *str, int *ss_type,
cur = 1;
if (str[1] != '*' && str[1] != '#' && str[1] > '9' && str[1] < '0')
if (str[1] != '*' && str[1] != '#' && (str[1] > '9' || str[1] < '0'))
goto out;
if (str[0] == '#' && str[1] == '*')