mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-11-13 00:55:42 +01:00
alsamixer: fix shift in parse_words()
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
e165d3413e
commit
19cc5daef4
1 changed files with 2 additions and 2 deletions
|
@ -155,7 +155,7 @@ const char *mixer_words =
|
||||||
static unsigned int parse_words(const char *name, const char* wordlist, unsigned int itemlen, unsigned int *number) {
|
static unsigned int parse_words(const char *name, const char* wordlist, unsigned int itemlen, unsigned int *number) {
|
||||||
unsigned int words = 0;
|
unsigned int words = 0;
|
||||||
unsigned int word;
|
unsigned int word;
|
||||||
unsigned int i;
|
int i;
|
||||||
char buf[16];
|
char buf[16];
|
||||||
char *endptr;
|
char *endptr;
|
||||||
|
|
||||||
|
@ -181,7 +181,7 @@ static unsigned int parse_words(const char *name, const char* wordlist, unsigned
|
||||||
word = W_NUMBER;
|
word = W_NUMBER;
|
||||||
}
|
}
|
||||||
else if ((i = strlist_index(wordlist, itemlen, buf)) >= 0)
|
else if ((i = strlist_index(wordlist, itemlen, buf)) >= 0)
|
||||||
word = 2U << i;
|
word = i <= 30 ? (2U << i) : 0;
|
||||||
else
|
else
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue