aboutsummaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorTorbjörn Andersson2004-05-01 16:42:58 +0000
committerTorbjörn Andersson2004-05-01 16:42:58 +0000
commit3ebb895e9a071d4d4363e774ee9831620de2017f (patch)
tree671f9102cb7bb9615ac9e4cb98f908f2098e7606 /sound
parente0600f4308e250906b2ab0cd1a947f804a5f92e6 (diff)
downloadscummvm-rg350-3ebb895e9a071d4d4363e774ee9831620de2017f.tar.gz
scummvm-rg350-3ebb895e9a071d4d4363e774ee9831620de2017f.tar.bz2
scummvm-rg350-3ebb895e9a071d4d4363e774ee9831620de2017f.zip
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
Diffstat (limited to 'sound')
-rw-r--r--sound/midiparser_smf.cpp5
1 files changed, 4 insertions, 1 deletions
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;