From 10eb23743500d0a583e14f9db7cd5f6f00b65953 Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Thu, 10 Jan 2002 08:32:29 +0000 Subject: [PATCH] Fixed parsing of boolean value for cset --- amixer/amixer.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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; -- 2.47.1