diff options
author | Johannes Schickel | 2010-01-01 19:45:49 +0000 |
---|---|---|
committer | Johannes Schickel | 2010-01-01 19:45:49 +0000 |
commit | e757e7a60a2c18faa81dea0486a0f127e77adac4 (patch) | |
tree | bb0e4c2ec20496957ea6cf3e144bdbdd0b8eac92 | |
parent | 98194bfe1307a7dc5b75546fb17c447844d6d5f9 (diff) | |
download | scummvm-rg350-e757e7a60a2c18faa81dea0486a0f127e77adac4.tar.gz scummvm-rg350-e757e7a60a2c18faa81dea0486a0f127e77adac4.tar.bz2 scummvm-rg350-e757e7a60a2c18faa81dea0486a0f127e77adac4.zip |
Fix out of bounds access reported by syke.
svn-id: r46844
-rw-r--r-- | engines/kyra/sound_midi.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/kyra/sound_midi.cpp b/engines/kyra/sound_midi.cpp index c7b5958653..9a6a2f0110 100644 --- a/engines/kyra/sound_midi.cpp +++ b/engines/kyra/sound_midi.cpp @@ -155,8 +155,8 @@ MidiOutput::MidiOutput(OSystem *system, MidiDriver *output, bool isMT32, bool de 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) { |