From 3723a0bad3a968e7df30ccb7a4df0fe1e4662e33 Mon Sep 17 00:00:00 2001 From: richiesams Date: Mon, 5 Aug 2013 11:50:39 -0500 Subject: ZVISION: sscanf to a uint first instead of directly to a bool --- engines/zvision/actions.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'engines') diff --git a/engines/zvision/actions.cpp b/engines/zvision/actions.cpp index cd84a6b85e..bddec38450 100644 --- a/engines/zvision/actions.cpp +++ b/engines/zvision/actions.cpp @@ -186,13 +186,15 @@ bool ActionPreloadAnimation::execute(ZVision *engine) { ActionPlayAnimation::ActionPlayAnimation(const Common::String &line) { char fileName[25]; + uint loop; // The two %*u are always 0 and dont seem to have a use sscanf(line.c_str(), "%*[^:]:%*[^:]:%u(%25s %u %u %u %u %u %u %u %*u %*u %u %u)", - &_key, fileName, &_x, &_y, &_width, &_height, &_start, &_end, &_loop, &_mask, &_framerate); + &_key, fileName, &_x, &_y, &_width, &_height, &_start, &_end, &loop, &_mask, &_framerate); _fileName = Common::String(fileName); + _loop = loop == 1 ? true : false; } bool ActionPlayAnimation::execute(ZVision *engine) { -- cgit v1.2.3