]> git.alsa-project.org Git - alsa-lib.git/commitdiff
ucm: fix parsing of the internal hexadecimal card identifier (2)
authorJaroslav Kysela <perex@perex.cz>
Fri, 12 Nov 2021 16:27:02 +0000 (17:27 +0100)
committerJaroslav Kysela <perex@perex.cz>
Fri, 12 Nov 2021 16:27:39 +0000 (17:27 +0100)
I forgot to change the passed variable name.

Fixes: 050f18c5 ("ucm: fix parsing of the internal hexadecimal card identifier")
Fixes: https://github.com/alsa-project/alsa-lib/issues/188
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
src/ucm/utils.c

index 5f61e2a25d52edc73fee673330468c33d7a385a5..598b02ab9b307e652c60b1bb7d81db12ffa58f8f 100644 (file)
@@ -821,7 +821,7 @@ const char *uc_mgr_alibcfg_by_device(snd_config_t **top, const char *name)
                return NULL;
        strncpy(buf, name + 4, 4);
        buf[4] = '\0';
-       err = safe_strtol_base(name, &card_num, 16);
+       err = safe_strtol_base(buf, &card_num, 16);
        if (err < 0 || card_num < 0 || card_num > 0xffff)
                return NULL;
        config = NULL;