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.

svn-id: r13719
This commit is contained in:
Torbjörn Andersson 2004-05-01 16:42:58 +00:00
parent e0600f4308
commit 3ebb895e9a

View File

@ -217,7 +217,10 @@ bool MidiParser_SMF::loadMusic (byte *data, uint32 size) {
}
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;