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:
parent
b7b5cda158
commit
a255947c16
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue