fixes a potential outofbound error

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17249 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Jérôme Duval 2006-04-27 19:07:30 +00:00
parent b7b5cda158
commit a255947c16
2 changed files with 2 additions and 2 deletions

View File

@ -663,7 +663,7 @@ emuxki_voice_channel_create(emuxki_voice *voice)
uint8 i, stereo = voice->stereo;
//int s;
for (i = 0; i < EMU_NUMCHAN; i += stereo + 1) {
for (i = 0; i < EMU_NUMCHAN - stereo; i += stereo + 1) {
if ((stereo && (channel[i + 1] != NULL)) ||
(channel[i] != NULL)) /* Looking for free channels */
continue;

View File

@ -630,7 +630,7 @@ emuxki_list_mix_controls(emuxki_dev *card, multi_mix_control_info * MMCI)
uint32 i;
MMC = MMCI->controls;
if(MMCI->control_count < 24)
if(MMCI->control_count < EMU_MULTICONTROLSNUM)
return B_ERROR;
if(emuxki_create_controls_list(&card->multi) < B_OK)