From 7c16006cc7f2aa7a9a464207db6b023db6966af4 Mon Sep 17 00:00:00 2001 From: Jamieson Christian Date: Thu, 31 Jul 2003 06:50:13 +0000 Subject: 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 --- scumm/imuse_player.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scumm') 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(); -- cgit v1.2.3