aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorWillem Jan Palenstijn2013-09-19 23:53:12 +0200
committerWillem Jan Palenstijn2013-09-19 23:54:27 +0200
commit5b23a251ceefaecdd4d46e1b27835adaf7dd7f99 (patch)
tree769ba109b71550a9aaf0bcbfb9cce2a2de51009d /engines
parentd6c5eed8ffd542bc137139f1289002e9c907094e (diff)
downloadscummvm-rg350-5b23a251ceefaecdd4d46e1b27835adaf7dd7f99.tar.gz
scummvm-rg350-5b23a251ceefaecdd4d46e1b27835adaf7dd7f99.tar.bz2
scummvm-rg350-5b23a251ceefaecdd4d46e1b27835adaf7dd7f99.zip
SCI: Fix too strict assert triggering in LSL5
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/sound/midiparser_sci.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/engines/sci/sound/midiparser_sci.cpp b/engines/sci/sound/midiparser_sci.cpp
index 7640c5f314..4b4333a37c 100644
--- a/engines/sci/sound/midiparser_sci.cpp
+++ b/engines/sci/sound/midiparser_sci.cpp
@@ -663,7 +663,10 @@ void MidiParser_SCI::parseNextEvent(EventInfo &info) {
// as there aren't any subsequent MIDI events after this one.
// This assert is here to detect cases where the song ends
// up jumping forward, like with bug #3614566 (see above).
- assert(_loopTick + info.delta < _position._playTick);
+ // (Exception: delta == 0, in which case the loop points
+ // at the previous event, which is fine.)
+ assert(_loopTick + info.delta < _position._playTick ||
+ ((_loopTick == _position._playTick && info.delta == 0)));
uint32 extraDelta = info.delta;
_pSnd->inFastForward = true;