]> git.alsa-project.org Git - alsa-lib.git/commitdiff
fixed the detection of dimensions in snd_ctl_elem_info_get_dimensions().
authorTakashi Iwai <tiwai@suse.de>
Tue, 20 May 2003 08:49:12 +0000 (08:49 +0000)
committerTakashi Iwai <tiwai@suse.de>
Tue, 20 May 2003 08:49:12 +0000 (08:49 +0000)
src/control/control.c

index afa051e097c310a7d00a12f90b0b47e623044077..9faa56a55b77510d7c82f66a429923ca17246940 100644 (file)
@@ -1700,7 +1700,7 @@ int snd_ctl_elem_info_get_dimensions(const snd_ctl_elem_info_t *obj)
        if (obj->access & SNDRV_CTL_ELEM_ACCESS_DINDIRECT)
                return 0;                       /* FIXME: implement indirect access as well */
        for (i = 3; i >= 0; i++)
-               if (obj->dimen.d[0])
+               if (obj->dimen.d[i])
                        break;
        return i >= 0 ? i + 1 : 0;
 }