OSDN Git Service

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 afa051e..9faa56a 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;
 }