diff options
author | David Turner | 2010-06-06 00:27:56 +0000 |
---|---|---|
committer | David Turner | 2010-06-06 00:27:56 +0000 |
commit | 193d7df5940ada9c2ec7e3a233c2b26aa3b25e84 (patch) | |
tree | d8020dbd18419cfd1ec1ea52dc824792a7a63f0a | |
parent | abcd8e093a52745a5925993c74abfe901234df3a (diff) | |
download | scummvm-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
-rw-r--r-- | sound/midiparser.cpp | 4 |
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) { |