aboutsummaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
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;