[Scummvm-cvs-logs] CVS: scummvm-new/sound fmopl.cpp,1.1.1.1,1.2
Max Horn
fingolfin at users.sourceforge.net
Wed Aug 21 10:14:02 CEST 2002
Update of /cvsroot/scummvm/scummvm-new/sound
In directory usw-pr-cvs1:/tmp/cvs-serv9755
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-new/sound/fmopl.cpp,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- fmopl.cpp 21 Aug 2002 16:07:41 -0000 1.1.1.1
+++ fmopl.cpp 21 Aug 2002 17:13:17 -0000 1.2
@@ -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