alsaucm: Fix ending with quotes commands

If we use 'alsaucm -n -b -' with 'get "CapturePCM/Internal Mic"' then
the alsaucm will report error and stop immediately. The reason is that
the parse_line in usecase.c appends an empty argument if a command ends
with quotes.

This change adds a patch to fix the parse_line function in usecase.c.

Signed-off-by: Cheng Yueh <cyueh@chromium.org>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
Cheng Yueh 2020-07-09 14:24:12 +08:00 committed by Jaroslav Kysela
parent 7fbd2311e2
commit 15539cd0e6

View file

@ -130,6 +130,8 @@ static int parse_line(struct context *context, char *line)
*line == '\n')) *line == '\n'))
line++; line++;
c = *line; c = *line;
if (c == '\0')
return 0;
if (c == '\"' || c == '\'') { if (c == '\"' || c == '\'') {
start = ++line; start = ++line;
while (*line && *line != c) while (*line && *line != c)