From 39de104c5c78d52fccbd82a3738e3bb9c10b949d Mon Sep 17 00:00:00 2001 From: David Turner Date: Sat, 22 Jan 2011 01:07:14 +0000 Subject: TOON: Fix Uninitialized Memory Read During Cursor Animation on Load. This was mainly due to _mouseX, which along with the associated variables was not defined until the first mouse event. This was detected by Valgrind. svn-id: r55402 --- engines/toon/toon.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'engines/toon') diff --git a/engines/toon/toon.cpp b/engines/toon/toon.cpp index e424405cd5..b54b3a7f1d 100644 --- a/engines/toon/toon.cpp +++ b/engines/toon/toon.cpp @@ -786,6 +786,11 @@ ToonEngine::ToonEngine(OSystem *syst, const ADGameDescription *gameDescription) _script_func = NULL; _script = NULL; + _mouseX = 0; + _mouseY = 0; + _mouseButton = 0; + _lastMouseButton = 0; + _saveBufferStream = NULL; _pathFinding = NULL; -- cgit v1.2.3