fixed the detection of dimensions in snd_ctl_elem_info_get_dimensions().

This commit is contained in:
Takashi Iwai 2003-05-20 08:49:12 +00:00
parent 02e9d7c3e6
commit 4bd0183b1f

View 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;
}