From d6e3cea087bd10619f9bad305a03f1517d714687 Mon Sep 17 00:00:00 2001 From: Marisa-Chan Date: Fri, 19 Dec 2014 17:03:07 +0600 Subject: ZVISION: Fix uninitialized scalar field (CID 1257083) --- engines/zvision/scripting/actions.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'engines/zvision/scripting') diff --git a/engines/zvision/scripting/actions.cpp b/engines/zvision/scripting/actions.cpp index b08a7f3c85..dbbb605e43 100644 --- a/engines/zvision/scripting/actions.cpp +++ b/engines/zvision/scripting/actions.cpp @@ -1050,9 +1050,11 @@ bool ActionTimer::execute() { ActionTtyText::ActionTtyText(ZVision *engine, int32 slotkey, const Common::String &line) : ResultAction(engine, slotkey) { + _delay = 0; + char filename[64]; - int32 x1, y1, x2, y2; - sscanf(line.c_str(), "%d %d %d %d %s %u", &x1, &y1, &x2, &y2, filename, &_delay); + int32 x1 = 0, y1 = 0, x2 = 0, y2 = 0; + sscanf(line.c_str(), "%d %d %d %d %64s %u", &x1, &y1, &x2, &y2, filename, &_delay); _r = Common::Rect(x1, y1, x2, y2); _filename = Common::String(filename); } -- cgit v1.2.3