From 3ebb895e9a071d4d4363e774ee9831620de2017f Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Sat, 1 May 2004 16:42:58 +0000 Subject: 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 --- sound/midiparser_smf.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'sound') diff --git a/sound/midiparser_smf.cpp b/sound/midiparser_smf.cpp index 60b74464ea..f7907c25a8 100644 --- a/sound/midiparser_smf.cpp +++ b/sound/midiparser_smf.cpp @@ -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; -- cgit v1.2.3