alsactl: Fix oops (when parsing card argument)

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
Jaroslav Kysela 2008-09-11 13:39:42 +02:00
parent 8ed6dcf98b
commit 0a8e8d581e

View file

@ -150,7 +150,7 @@ int main(int argc, char *argv[])
}
cardname = argc - optind > 1 ? argv[optind + 1] : NULL;
for (tmp = devfiles; cardname != NULL && tmp != NULL; tmp++) {
for (tmp = devfiles; cardname != NULL && *tmp != NULL; tmp++) {
int len = strlen(*tmp);
if (!strncmp(cardname, *tmp, len)) {
long l = strtol(cardname + len, NULL, 0);