Fix a buffer overflow in AL_AddLoopSounds

This fixes a crash in mine4.bsp and most likely some other problems.
The bug was reported by "mxmvasilyev0 [at] gmail [dot] com" and tracked
as Github issue #1.
This commit is contained in:
Yamagi Burmeister 2012-05-12 14:42:15 +02:00
parent 6ee203d70c
commit 4a414b588e
1 changed files with 2 additions and 2 deletions

View File

@ -288,7 +288,7 @@ static channel_t *AL_FindLoopingSound( int entnum, sfx_t *sfx ) {
static void AL_AddLoopSounds( void ) {
int i;
int sounds[64]; // 64 is MAX_PACKET_ENTITIES in YQ2 (there's no define for it, though :/)
int sounds[MAX_EDICTS];
channel_t *ch;
sfx_t *sfx;
sfxcache_t *sc;