From: Takashi Iwai Date: Tue, 20 May 2003 08:49:12 +0000 (+0000) Subject: fixed the detection of dimensions in snd_ctl_elem_info_get_dimensions(). X-Git-Tag: v1.0.3~170 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=4bd0183b1ffe611ad54f261190efd0ec6a88f95e;p=alsa-lib.git fixed the detection of dimensions in snd_ctl_elem_info_get_dimensions(). --- diff --git a/src/control/control.c b/src/control/control.c index afa051e0..9faa56a5 100644 --- a/src/control/control.c +++ b/src/control/control.c @@ -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; }