]> git.alsa-project.org Git - alsa-tools.git/commitdiff
us428control - Fix array overflow
authorTakashi Iwai <tiwai@suse.de>
Mon, 8 Jun 2009 09:48:45 +0000 (11:48 +0200)
committerTakashi Iwai <tiwai@suse.de>
Mon, 8 Jun 2009 09:48:45 +0000 (11:48 +0200)
Fix the array overflow in accessing Vol[],
   Cus428State.cc:257:32: warning: array subscript is above array bounds

Signed-off-by: Takashi Iwai <tiwai@suse.de>
us428control/Cus428State.cc

index 7c517c5f21ea56be7a832e42fb39f235b5ceeb35..280c21dd7264625d163cdeceb11bf1aa244444aa 100644 (file)
@@ -253,7 +253,7 @@ void Cus428State::KnobChangedTo(eKnobs K, bool V)
                        LightSend();
                        if (StateInputMonitor()) {
                                if (LightIs(eL_Solo)) {
-                                       for (int i = 0; i < 8; ++i) {
+                                       for (int i = 0; i < 5; ++i) {
                                                usX2Y_volume V = Volume[i];
                                                if (!LightIs(eL_Mute0 + i) || (MuteInputMonitor & (1 << i)))
                                                        V.LH = V.LL = V.RL = V.RH = 0;