engine: client: fix buffer overflow in voice sound mixer
This commit is contained in:
parent
a5ef33b302
commit
5554d13f7f
1 changed files with 6 additions and 2 deletions
|
@ -956,7 +956,11 @@ static void MIX_MixRawSamplesBuffer( int end )
|
||||||
}
|
}
|
||||||
|
|
||||||
if( ch->entnum > 0 )
|
if( ch->entnum > 0 )
|
||||||
SND_MoveMouthRaw( ch, &ch->rawsamples[paintedtime & ( ch->max_samples - 1 )], stop - paintedtime );
|
{
|
||||||
|
int pos = paintedtime & ( ch->max_samples - 1 );
|
||||||
|
|
||||||
|
SND_MoveMouthRaw( ch, &ch->rawsamples[pos], bound( 0, ch->max_samples - pos, stop - paintedtime ));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue