diff options
author | Jamieson Christian | 2003-07-31 06:50:13 +0000 |
---|---|---|
committer | Jamieson Christian | 2003-07-31 06:50:13 +0000 |
commit | 7c16006cc7f2aa7a9a464207db6b023db6966af4 (patch) | |
tree | c335336fe7a91f2119497df74fc6119544e26c07 /scumm | |
parent | c5de74558008f1b33c6f3a73f306d5d0950aa10d (diff) | |
download | scummvm-rg350-7c16006cc7f2aa7a9a464207db6b023db6966af4.tar.gz scummvm-rg350-7c16006cc7f2aa7a9a464207db6b023db6966af4.tar.bz2 scummvm-rg350-7c16006cc7f2aa7a9a464207db6b023db6966af4.zip |
Fix for RC bug [780675] MI2: Reoccuring crash
Tightened up OOB track selection handling in
MidiParser. Apparently some SMFs in the Mac
version of MI2 (and other games?) specify
track -1 in their jump commands to indicate
a jump within the same track.
svn-id: r9321
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/imuse_player.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scumm/imuse_player.cpp b/scumm/imuse_player.cpp index 3b9c225043..2257230bdd 100644 --- a/scumm/imuse_player.cpp +++ b/scumm/imuse_player.cpp @@ -698,8 +698,8 @@ void Player::key_off(uint8 chan, byte note) { bool Player::jump(uint track, uint beat, uint tick) { if (!_parser) return false; - _track_index = track; - _parser->setTrack (track); + if (_parser->setTrack (track)) + _track_index = track; if (!_parser->jumpToTick ((beat - 1) * TICKS_PER_BEAT + tick)) return false; turn_off_pedals(); |