aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/sound
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sci/sound')
-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);