From: Takashi Iwai Date: Mon, 8 Jun 2009 09:48:45 +0000 (+0200) Subject: us428control - Fix array overflow X-Git-Tag: v1.0.21~3 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=88343d7989c37061e86e1e308490b32e03a6c481;p=alsa-tools.git us428control - Fix array overflow Fix the array overflow in accessing Vol[], Cus428State.cc:257:32: warning: array subscript is above array bounds Signed-off-by: Takashi Iwai --- diff --git a/us428control/Cus428State.cc b/us428control/Cus428State.cc index 7c517c5..280c21d 100644 --- a/us428control/Cus428State.cc +++ b/us428control/Cus428State.cc @@ -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;