diff options
author | Andrei Prykhodko | 2018-06-30 17:25:14 +0300 |
---|---|---|
committer | Andrei Prykhodko | 2018-06-30 19:43:34 +0300 |
commit | 5294c8d25236472ac941d29e4f41310ebdaae0f5 (patch) | |
tree | 086de9a0f20674ae2a4175518de08bff6b4d4fe9 /engines/pink | |
parent | d38ed02895574830708451e1e10f2986997981ed (diff) | |
download | scummvm-rg350-5294c8d25236472ac941d29e4f41310ebdaae0f5.tar.gz scummvm-rg350-5294c8d25236472ac941d29e4f41310ebdaae0f5.tar.bz2 scummvm-rg350-5294c8d25236472ac941d29e4f41310ebdaae0f5.zip |
PINK: fixed possible bug when curFrame is -1
Diffstat (limited to 'engines/pink')
-rw-r--r-- | engines/pink/objects/actions/action_loop.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
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(); |