--- hatari/src/gui-sdl/dlgSound.c 2019/04/09 08:47:27 1.1.1.7 +++ hatari/src/gui-sdl/dlgSound.c 2019/04/09 08:48:52 1.1.1.8 @@ -78,9 +78,9 @@ static const int nSoundFreqs[] = /*-----------------------------------------------------------------------*/ -/* - Show and process the sound dialog. -*/ +/** + * Show and process the sound dialog. + */ void Dialog_SoundDlg(void) { int but, i; @@ -97,7 +97,7 @@ void Dialog_SoundDlg(void) for (i = DLGSOUND_11KHZ; i <= DLGSOUND_50KHZ; i++) sounddlg[i].state &= ~SG_SELECTED; - for (i = 0; i < DLGSOUND_50KHZ-DLGSOUND_11KHZ; i++) + for (i = 0; i <= DLGSOUND_50KHZ-DLGSOUND_11KHZ; i++) { if (ConfigureParams.Sound.nPlaybackFreq > nSoundFreqs[i]-500 && ConfigureParams.Sound.nPlaybackFreq < nSoundFreqs[i]+500)