aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWalter van Niftrik2010-11-25 11:19:46 +0000
committerWalter van Niftrik2010-11-25 11:19:46 +0000
commit8c4ebc434dbe595ccee6244a72384309dcebbb43 (patch)
tree4575645e069f3bbf59a1d8f5ea770389db92e412
parent5ae718d148a5c7a0b5c1facc1ecc40dcda4c1b28 (diff)
downloadscummvm-rg350-8c4ebc434dbe595ccee6244a72384309dcebbb43.tar.gz
scummvm-rg350-8c4ebc434dbe595ccee6244a72384309dcebbb43.tar.bz2
scummvm-rg350-8c4ebc434dbe595ccee6244a72384309dcebbb43.zip
SCI: Fix bug in MT-32 checksum computation. Thanks Sven for finding this.
svn-id: r54471
-rw-r--r--engines/sci/sound/drivers/midi.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/sci/sound/drivers/midi.cpp b/engines/sci/sound/drivers/midi.cpp
index ba4e719c92..7cc4e1922c 100644
--- a/engines/sci/sound/drivers/midi.cpp
+++ b/engines/sci/sound/drivers/midi.cpp
@@ -441,9 +441,9 @@ void MidiPlayer_Midi::sendMt32SysEx(const uint32 addr, Common::SeekableReadStrea
_sysExBuf[7 + i] = str->readByte();
for (int i = 4; i < 7 + len; i++)
- chk += _sysExBuf[i];
+ chk -= _sysExBuf[i];
- _sysExBuf[7 + len] = 128 - chk % 128;
+ _sysExBuf[7 + len] = chk & 0x7f;
if (noDelay)
_driver->sysEx(_sysExBuf, len + 8);