From 1f9d9118b9e7e2841e35739deed1a9e6b64229ab Mon Sep 17 00:00:00 2001 From: Flamefire Date: Tue, 29 Apr 2014 21:12:19 +0200 Subject: [PATCH] Fix OutOfBounds access --- Vocaluxe/Screens/CScreenOptionsRecord.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Vocaluxe/Screens/CScreenOptionsRecord.cs b/Vocaluxe/Screens/CScreenOptionsRecord.cs index a0c072d6..d2c066d8 100644 --- a/Vocaluxe/Screens/CScreenOptionsRecord.cs +++ b/Vocaluxe/Screens/CScreenOptionsRecord.cs @@ -15,6 +15,7 @@ // along with Vocaluxe. If not, see . #endregion +using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Windows.Forms; @@ -223,6 +224,7 @@ namespace Vocaluxe.Screens if (_CheckMicConfig()) { + Console.WriteLine(CRecord.GetMaxVolume(0)); int player = _SelectSlides[_SelectSlideRecordChannel1].Selection - 1; if (player >= 0) { @@ -238,7 +240,7 @@ namespace Vocaluxe.Screens player = _SelectSlides[_SelectSlideRecordChannel2].Selection - 1; if (player >= 0) { - _ChannelEnergy[1] = CRecord.GetMaxVolume(player - 1); + _ChannelEnergy[1] = CRecord.GetMaxVolume(player); _Equalizers[_EqualizerChannel2].Update(CRecord.ToneWeigth(player), CRecord.GetMaxVolume(player)); } else