diff options
author | Walter van Niftrik | 2010-11-25 11:19:46 +0000 |
---|---|---|
committer | Walter van Niftrik | 2010-11-25 11:19:46 +0000 |
commit | 8c4ebc434dbe595ccee6244a72384309dcebbb43 (patch) | |
tree | 4575645e069f3bbf59a1d8f5ea770389db92e412 /engines | |
parent | 5ae718d148a5c7a0b5c1facc1ecc40dcda4c1b28 (diff) | |
download | scummvm-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
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sci/sound/drivers/midi.cpp | 4 |
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); |