aboutsummaryrefslogtreecommitdiff
path: root/sound/midiparser.cpp
diff options
context:
space:
mode:
authorDavid Turner2010-06-06 00:27:56 +0000
committerDavid Turner2010-06-06 00:27:56 +0000
commit193d7df5940ada9c2ec7e3a233c2b26aa3b25e84 (patch)
treed8020dbd18419cfd1ec1ea52dc824792a7a63f0a /sound/midiparser.cpp
parentabcd8e093a52745a5925993c74abfe901234df3a (diff)
downloadscummvm-rg350-193d7df5940ada9c2ec7e3a233c2b26aa3b25e84.tar.gz
scummvm-rg350-193d7df5940ada9c2ec7e3a233c2b26aa3b25e84.tar.bz2
scummvm-rg350-193d7df5940ada9c2ec7e3a233c2b26aa3b25e84.zip
Correction for SCI valgrind uninit memory error in MIDI sound which occurs during LSL6 intro.
This may be "hiding" a bug in the use of sound/midiparser.cpp in SCI i.e. incorrect use of parseNextEvent(), so this should be reviewed, but this patch initialises _next_event at object construction, which corrects this, should not break anything else and is good practice. svn-id: r49445
Diffstat (limited to 'sound/midiparser.cpp')
-rw-r--r--sound/midiparser.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/midiparser.cpp b/sound/midiparser.cpp
index 99319461e9..8ae2bad71a 100644
--- a/sound/midiparser.cpp
+++ b/sound/midiparser.cpp
@@ -47,6 +47,10 @@ _num_tracks(0),
_active_track(255),
_abort_parse(0) {
memset(_active_notes, 0, sizeof(_active_notes));
+ _next_event.start = NULL;
+ _next_event.delta = 0;
+ _next_event.event = 0;
+ _next_event.length = 0;
}
void MidiParser::property(int prop, int value) {