From 5ff032c27d5110ebd8b6f73e0c822eba2245246b Mon Sep 17 00:00:00 2001 From: richiesams Date: Sat, 24 Aug 2013 01:11:10 -0500 Subject: ZVISION: Cast completeFrame and frameNumber to int so their difference can go negative --- engines/zvision/rlf_animation.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engines/zvision/rlf_animation.cpp b/engines/zvision/rlf_animation.cpp index c95a8640c1..ff855a1a39 100644 --- a/engines/zvision/rlf_animation.cpp +++ b/engines/zvision/rlf_animation.cpp @@ -168,9 +168,9 @@ const uint16 *RlfAnimation::getFrameData(uint frameNumber) { } uint closestFrame = _currentFrame; - uint distance = ABS(_currentFrame - frameNumber); + int distance = ABS(_currentFrame - (int)frameNumber); for (Common::List::const_iterator iter = _completeFrames.begin(); iter != _completeFrames.end(); iter++) { - uint newDistance = ABS((*iter) - frameNumber); + int newDistance = ABS((int)(*iter) - (int)frameNumber); if (closestFrame == -1 || newDistance < distance) { closestFrame = (*iter); distance = newDistance; -- cgit v1.2.3