mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2025-04-02 00:11:18 +00:00
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:
parent
6ee203d70c
commit
4a414b588e
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
|
@ -395,7 +395,7 @@ void AL_Update( void ) {
|
|||
Com_Printf ("%.1f %s\n", ch->master_vol, ch->sfx->name);
|
||||
}
|
||||
|
||||
AL_Spatialize(ch); // respatialize channel
|
||||
AL_Spatialize(ch); // respatialize channel
|
||||
}
|
||||
|
||||
s_framecount++;
|
||||
|
|
Loading…
Reference in a new issue