Update of /cvsroot/alsa/alsa-lib/src/control
In directory sc8-pr-cvs1:/tmp/cvs-serv10258

Modified Files:
        control.c 
Log Message:
Giuliano Pochini <[EMAIL PROTECTED]>
snd_ctl_elem_info_get_dimension? fixes


Index: control.c
===================================================================
RCS file: /cvsroot/alsa/alsa-lib/src/control/control.c,v
retrieving revision 1.97
retrieving revision 1.98
diff -u -r1.97 -r1.98
--- control.c   20 May 2003 08:49:12 -0000      1.97
+++ control.c   14 Jul 2003 07:56:03 -0000      1.98
@@ -1699,10 +1699,10 @@
        assert(obj);
        if (obj->access & SNDRV_CTL_ELEM_ACCESS_DINDIRECT)
                return 0;                       /* FIXME: implement indirect access as 
well */
-       for (i = 3; i >= 0; i++)
+       for (i = 3; i >= 0; i--)
                if (obj->dimen.d[i])
                        break;
-       return i >= 0 ? i + 1 : 0;
+       return i + 1;
 }
 use_default_symbol_version(__snd_ctl_elem_info_get_dimensions, 
snd_ctl_elem_info_get_dimensions, ALSA_0.9.3);
 
@@ -1722,7 +1722,7 @@
                return 0;                       /* FIXME: implement indirect access as 
well */
        if (idx >= 3)
                return 0;
-       return obj->dimen.d[0];
+       return obj->dimen.d[idx];
 }
 use_default_symbol_version(__snd_ctl_elem_info_get_dimension, 
snd_ctl_elem_info_get_dimension, ALSA_0.9.3);
 



-------------------------------------------------------
This SF.Net email sponsored by: Parasoft
Error proof Web apps, automate testing & more.
Download & eval WebKing and get a free book.
www.parasoft.com/bulletproofapps1
_______________________________________________
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog

Reply via email to