[Scummvm-cvs-logs] CVS: scummvm/sound fmopl.cpp,1.10,1.11
Max Horn
fingolfin at users.sourceforge.net
Wed Aug 21 10:14:01 CEST 2002
Update of /cvsroot/scummvm/scummvm/sound
In directory usw-pr-cvs1:/tmp/cvs-serv9742
Modified Files:
fmopl.cpp
Log Message:
fixed one-off-error (I hope this fix is right?); use calloc instead of malloc to ensure struct is zeroed
Index: fmopl.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sound/fmopl.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- fmopl.cpp 8 May 2002 02:06:26 -0000 1.10
+++ fmopl.cpp 21 Aug 2002 17:13:15 -0000 1.11
@@ -564,7 +564,7 @@
OPL->AR_TABLE[i] = (int)(rate / ARRATE);
OPL->DR_TABLE[i] = (int)(rate / DRRATE);
}
- for (i = 60;i < 76;i++)
+ for (i = 60;i < 75;i++)
{
OPL->AR_TABLE[i] = EG_AED-1;
OPL->DR_TABLE[i] = OPL->DR_TABLE[60];
@@ -1038,7 +1038,7 @@
state_size += sizeof(OPL_CH)*max_ch;
/* allocate memory block */
- ptr = (char *)malloc(state_size);
+ ptr = (char *)calloc(state_size, 1);
if(ptr==NULL) return NULL;
/* clear */
More information about the Scummvm-git-logs
mailing list