mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-11-09 17:05:41 +01:00
Fixed parsing of boolean value for cset
This commit is contained in:
parent
ccb2381331
commit
10eb237435
1 changed files with 5 additions and 2 deletions
|
@ -951,10 +951,13 @@ static int cset(int argc, char *argv[], int roflag)
|
|||
tmp = snd_ctl_elem_value_get_boolean(control, idx);
|
||||
tmp = tmp > 0 ? 0 : 1;
|
||||
ptr += 6;
|
||||
} else if (atoi(ptr)) {
|
||||
tmp = 1;
|
||||
} else if (isdigit(*ptr)) {
|
||||
tmp = atoi(ptr) > 0 ? 1 : 0;
|
||||
while (isdigit(*ptr))
|
||||
ptr++;
|
||||
} else {
|
||||
while (*ptr && *ptr != ',')
|
||||
ptr++;
|
||||
}
|
||||
snd_ctl_elem_value_set_boolean(control, idx, tmp);
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue