mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-27 04:41:23 +00:00
Merge branch 'fix-gme-free' into 'master'
Fix crash with GME sounds when being freed See merge request STJr/SRB2!504
This commit is contained in:
commit
3e708e62e8
1 changed files with 2 additions and 2 deletions
|
@ -362,7 +362,7 @@ void *I_GetSfx(sfxinfo_t *sfx)
|
|||
gme_track_info(emu, &info, 0);
|
||||
|
||||
len = (info->play_length * 441 / 10) << 2;
|
||||
mem = malloc(len);
|
||||
mem = Z_Malloc(len, PU_SOUND, 0);
|
||||
gme_play(emu, len >> 1, mem);
|
||||
gme_free_info(info);
|
||||
gme_delete(emu);
|
||||
|
@ -435,7 +435,7 @@ void *I_GetSfx(sfxinfo_t *sfx)
|
|||
gme_track_info(emu, &info, 0);
|
||||
|
||||
len = (info->play_length * 441 / 10) << 2;
|
||||
mem = malloc(len);
|
||||
mem = Z_Malloc(len, PU_SOUND, 0);
|
||||
gme_play(emu, len >> 1, mem);
|
||||
gme_free_info(info);
|
||||
gme_delete(emu);
|
||||
|
|
Loading…
Reference in a new issue