aboutsummaryrefslogtreecommitdiff
path: root/engines/pink
diff options
context:
space:
mode:
authorAndrei Prykhodko2018-06-30 17:25:14 +0300
committerAndrei Prykhodko2018-06-30 19:43:34 +0300
commit5294c8d25236472ac941d29e4f41310ebdaae0f5 (patch)
tree086de9a0f20674ae2a4175518de08bff6b4d4fe9 /engines/pink
parentd38ed02895574830708451e1e10f2986997981ed (diff)
downloadscummvm-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.cpp10
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();