Skip to content

Commit 99c123e

Browse files
authored
External sound filenames only cleared when exiting a game (dkfans#2986)
Fixes dkfans#2985
1 parent c41df0e commit 99c123e

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed

src/main.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3920,6 +3920,7 @@ void game_loop(void)
39203920
StopMusicPlayer();
39213921
free_custom_music();
39223922
free_sound_chunks();
3923+
memset(&game.loaded_sound,0,DISKPATH_SIZE * EXTERNAL_SOUNDS_COUNT);
39233924
turn_off_all_menus();
39243925
delete_all_structures();
39253926
clear_mapwho();

src/sounds.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -843,7 +843,6 @@ void free_sound_chunks()
843843
{
844844
Mix_FreeChunk(Ext_Sounds[i]);
845845
Ext_Sounds[i] = NULL;
846-
memset(game.loaded_sound[i],0,DISKPATH_SIZE);
847846
}
848847
}
849848
game.sounds_count = 0;

0 commit comments

Comments
 (0)