-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)
This commit is contained in:
parent
567d403a3e
commit
7ab8846882
|
@ -140,6 +140,8 @@ int SPU_Init(int coreid, int buffersize)
|
||||||
if ((SPU = (SPU_struct *)malloc(sizeof(SPU_struct))) == NULL)
|
if ((SPU = (SPU_struct *)malloc(sizeof(SPU_struct))) == NULL)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
memset((void *)SPU, 0, sizeof(SPU_struct));
|
||||||
|
|
||||||
SPU_Reset();
|
SPU_Reset();
|
||||||
|
|
||||||
return SPU_ChangeSoundCore(coreid, buffersize);
|
return SPU_ChangeSoundCore(coreid, buffersize);
|
||||||
|
|
Loading…
Reference in New Issue