From 42cc71fef0c7d2f153a90f7fd7e0ca7849c2be75 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Wed, 30 Oct 2013 00:46:52 +0100 Subject: TOON: Fix CID 1002427, 1002428, 1002429 --- engines/toon/script.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'engines/toon/script.cpp') diff --git a/engines/toon/script.cpp b/engines/toon/script.cpp index 69ae727bb5..3e6738f479 100644 --- a/engines/toon/script.cpp +++ b/engines/toon/script.cpp @@ -59,6 +59,8 @@ EMCInterpreter::EMCInterpreter(ToonEngine *vm) : _vm(vm), _scriptData(0), _filen }; _opcodes = opcodes; #undef OPCODE + + _parameter = 0; } EMCInterpreter::~EMCInterpreter() { -- cgit v1.2.3 From 5b086651ba61b8e51c702840bec12cddefb1188e Mon Sep 17 00:00:00 2001 From: Strangerke Date: Wed, 30 Oct 2013 23:10:30 +0100 Subject: TOON: For consistency, replace the remaining strncpy by strlcpy --- engines/toon/script.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'engines/toon/script.cpp') diff --git a/engines/toon/script.cpp b/engines/toon/script.cpp index 3e6738f479..d752c277db 100644 --- a/engines/toon/script.cpp +++ b/engines/toon/script.cpp @@ -134,8 +134,7 @@ bool EMCInterpreter::load(const char *filename, EMCData *scriptData, const Commo _scriptData->sysFuncs = opcodes; - strncpy(_scriptData->filename, filename, 13); - _scriptData->filename[12] = 0; + Common::strlcpy(_scriptData->filename, filename, 13); _scriptData = 0; _filename = 0; -- cgit v1.2.3