[Scummvm-cvs-logs] SF.net SVN: scummvm:[49445] scummvm/trunk/sound/midiparser.cpp

tdhs at users.sourceforge.net tdhs at users.sourceforge.net
Sun Jun 6 02:27:56 CEST 2010


Revision: 49445
          http://scummvm.svn.sourceforge.net/scummvm/?rev=49445&view=rev
Author:   tdhs
Date:     2010-06-06 00:27:56 +0000 (Sun, 06 Jun 2010)

Log Message:
-----------
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.

Modified Paths:
--------------
    scummvm/trunk/sound/midiparser.cpp

Modified: scummvm/trunk/sound/midiparser.cpp
===================================================================
--- scummvm/trunk/sound/midiparser.cpp	2010-06-05 22:45:36 UTC (rev 49444)
+++ scummvm/trunk/sound/midiparser.cpp	2010-06-06 00:27:56 UTC (rev 49445)
@@ -47,6 +47,10 @@
 _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) {


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list