From 7ab8846882a42a2382bca16ad4170f3b1473f2c4 Mon Sep 17 00:00:00 2001 From: cyberwarriorx Date: Sat, 9 Dec 2006 05:19:56 +0000 Subject: [PATCH] -Fixed a bug that only showed up when I was compiling with mingw(I guess microsoft compilers must handle free()'s to invalid pointers a lot better) --- desmume/src/SPU.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/desmume/src/SPU.c b/desmume/src/SPU.c index 6ef38a52a..2e140da83 100644 --- a/desmume/src/SPU.c +++ b/desmume/src/SPU.c @@ -140,6 +140,8 @@ int SPU_Init(int coreid, int buffersize) if ((SPU = (SPU_struct *)malloc(sizeof(SPU_struct))) == NULL) return -1; + memset((void *)SPU, 0, sizeof(SPU_struct)); + SPU_Reset(); return SPU_ChangeSoundCore(coreid, buffersize);