mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-11-09 18:05:42 +01:00
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:
parent
7fbd2311e2
commit
15539cd0e6
1 changed files with 2 additions and 0 deletions
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue