mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Fix crash with GME sounds when being freed
This commit is contained in:
parent
1d5f417a86
commit
e6332f97d8
1 changed files with 2 additions and 2 deletions
|
|
@ -390,7 +390,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);
|
||||
|
|
@ -463,7 +463,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…
Add table
Reference in a new issue