From: Jaroslav Kysela Date: Thu, 10 Jan 2002 08:32:29 +0000 (+0000) Subject: Fixed parsing of boolean value for cset X-Git-Tag: v1.0.3~157 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=10eb23743500d0a583e14f9db7cd5f6f00b65953;p=alsa-utils.git Fixed parsing of boolean value for cset --- diff --git a/amixer/amixer.c b/amixer/amixer.c index 25d7b9a..5629236 100644 --- a/amixer/amixer.c +++ b/amixer/amixer.c @@ -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;