[Scummvm-cvs-logs] SF.net SVN: scummvm:[46845] scummvm/branches/branch-1-0-0/engines/kyra/ sound_midi.cpp

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


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

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

Modified Paths:
--------------
    scummvm/branches/branch-1-0-0/engines/kyra/sound_midi.cpp

Modified: scummvm/branches/branch-1-0-0/engines/kyra/sound_midi.cpp
===================================================================
--- scummvm/branches/branch-1-0-0/engines/kyra/sound_midi.cpp	2010-01-01 19:45:49 UTC (rev 46844)
+++ scummvm/branches/branch-1-0-0/engines/kyra/sound_midi.cpp	2010-01-01 19:49:08 UTC (rev 46845)
@@ -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