From e436a5dc438e048a8ecbcc62d75bcd452443a824 Mon Sep 17 00:00:00 2001 From: Kp Date: Sun, 6 Oct 2013 18:08:39 +0000 Subject: [PATCH] Use MALLOC for hoard reading --- similar/main/multi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/similar/main/multi.c b/similar/main/multi.c index b6a7e2f06..a8ac1c0d4 100644 --- a/similar/main/multi.c +++ b/similar/main/multi.c @@ -5181,7 +5181,7 @@ void init_hoard_data() } GameSounds[Num_sound_files+i].length = len; - GameSounds[Num_sound_files+i].data = d_malloc(len); + MALLOC(GameSounds[Num_sound_files+i].data, ubyte, len); PHYSFS_read(ifile,GameSounds[Num_sound_files+i].data,1,len); if (GameArg.SndDigiSampleRate == SAMPLE_RATE_11K) { @@ -5253,7 +5253,7 @@ void save_hoard_data(void) ifile = PHYSFS_openRead(sounds[i]); Assert(ifile != NULL); size = PHYSFS_fileLength(ifile); - buf = d_malloc(size); + MALLOC(buf, ubyte, size); PHYSFS_read(ifile, buf, size, 1); PHYSFS_writeULE32(ofile, size); PHYSFS_write(ofile, buf, size, 1);