src/sound.cpp
branchcustombridgeheads
changeset 5650 aefc131bf5ce
parent 5649 55c8267c933f
child 5860 7fdc9b423ba1
--- a/src/sound.cpp	Thu Jan 11 13:41:16 2007 +0000
+++ b/src/sound.cpp	Mon Jan 15 20:14:06 2007 +0000
@@ -11,6 +11,7 @@
 #include "viewport.h"
 #include "fileio.h"
 #include "newgrf_sound.h"
+#include "helpers.hpp"
 
 static uint _file_count;
 static FileEntry *_files;
@@ -28,7 +29,7 @@
 
 	FioOpenFile(SOUND_SLOT, filename);
 	count = FioReadDword() / 8;
-	fe = calloc(count, sizeof(*fe));
+	CallocT(&fe, count);
 
 	if (fe == NULL) {
 		_file_count = 0;
@@ -109,7 +110,7 @@
 
 	if (fe->file_size == 0) return false;
 
-	mem = malloc(fe->file_size);
+	MallocT(&mem, fe->file_size);
 	if (mem == NULL) return false;
 
 	FioSeekToFile(fe->file_offset);