From 5b23a251ceefaecdd4d46e1b27835adaf7dd7f99 Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Thu, 19 Sep 2013 23:53:12 +0200 Subject: SCI: Fix too strict assert triggering in LSL5 --- engines/sci/sound/midiparser_sci.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'engines') 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; -- cgit v1.2.3