[Scummvm-cvs-logs] SF.net SVN: scummvm:[46844] scummvm/trunk/engines/kyra/sound_midi.cpp

lordhoto at users.sourceforge.net lordhoto at users.sourceforge.net
Fri Jan 1 20:45:49 CET 2010


Revision: 46844
          http://scummvm.svn.sourceforge.net/scummvm/?rev=46844&view=rev
Author:   lordhoto
Date:     2010-01-01 19:45:49 +0000 (Fri, 01 Jan 2010)

Log Message:
-----------
Fix out of bounds access reported by syke.

Modified Paths:
--------------
    scummvm/trunk/engines/kyra/sound_midi.cpp

Modified: scummvm/trunk/engines/kyra/sound_midi.cpp
===================================================================
--- scummvm/trunk/engines/kyra/sound_midi.cpp	2010-01-01 19:23:23 UTC (rev 46843)
+++ scummvm/trunk/engines/kyra/sound_midi.cpp	2010-01-01 19:45:49 UTC (rev 46844)
@@ -155,8 +155,8 @@
 
 	for (int i = 1; i <= 9; ++i) {
 		sendIntern(0xE0, i, 0x00, 0x40);
-		if (defaultPrograms[i] != 0xFF)
-			sendIntern(0xC0, i, defaultPrograms[i-1], 0x00);
+		if (defaultPrograms[i - 1] != 0xFF)
+			sendIntern(0xC0, i, defaultPrograms[i - 1], 0x00);
 	}
 
 	for (int i = 0; i < 4; ++i) {


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