From 5294c8d25236472ac941d29e4f41310ebdaae0f5 Mon Sep 17 00:00:00 2001 From: Andrei Prykhodko Date: Sat, 30 Jun 2018 17:25:14 +0300 Subject: PINK: fixed possible bug when curFrame is -1 --- engines/pink/objects/actions/action_loop.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'engines') diff --git a/engines/pink/objects/actions/action_loop.cpp b/engines/pink/objects/actions/action_loop.cpp index 18e9bf4c5c..500a001b4c 100644 --- a/engines/pink/objects/actions/action_loop.cpp +++ b/engines/pink/objects/actions/action_loop.cpp @@ -54,10 +54,10 @@ void ActionLoop::toConsole() { } void ActionLoop::update() { - uint frame = _decoder.getCurFrame(); + int frame = _decoder.getCurFrame(); if (!_inLoop) { - if (frame < _startFrame) { + if (frame < (int)_startFrame) { decodeNext(); return; } else @@ -67,7 +67,7 @@ void ActionLoop::update() { switch (_style) { case kPingPong: if (_forward) { - if (frame < (uint)_stopFrame) { + if (frame < _stopFrame) { decodeNext(); } else { _forward = false; @@ -75,7 +75,7 @@ void ActionLoop::update() { decodeNext(); } } else { - if (frame > _startFrame) { + if (frame > (int)_startFrame) { setFrame(frame - 1); } else { _forward = true; @@ -90,7 +90,7 @@ void ActionLoop::update() { break; } case kForward: - if (frame == (uint)_stopFrame) { + if (frame == _stopFrame) { setFrame(_startFrame); } decodeNext(); -- cgit v1.2.3