[Scummvm-cvs-logs] CVS: scummvm/sound midiparser_smf.cpp,1.19,1.20

Torbj?rn Andersson eriktorbjorn at users.sourceforge.net
Sat May 1 09:44:02 CEST 2004


Update of /cvsroot/scummvm/scummvm/sound
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11768

Modified Files:
	midiparser_smf.cpp 
Log Message:
Doubled the buffer size to prevent crashes with the Inherit the Earth
MIDIs. This is a temporary fix - Jamieson630 said something about making a
better fix later - but it will have to do for now.


Index: midiparser_smf.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sound/midiparser_smf.cpp,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- midiparser_smf.cpp	1 May 2004 13:16:45 -0000	1.19
+++ midiparser_smf.cpp	1 May 2004 16:42:58 -0000	1.20
@@ -217,7 +217,10 @@
 	}
 
 	if (midi_type == 1) {
-		_buffer = (byte *) malloc (size);
+		// FIXME: Doubled the buffer size to prevent crashes with the
+		// Inherit the Earth MIDIs. Jamieson630 said something about a
+		// better fix, but this will have to do in the meantime.
+		_buffer = (byte *) malloc (size * 2);
 		compressToType0();
 		_num_tracks = 1;
 		_tracks[0] = _buffer;





More information about the Scummvm-git-logs mailing list