aboutsummaryrefslogtreecommitdiff
path: root/engines/toon
diff options
context:
space:
mode:
authorDavid Turner2011-01-22 01:07:14 +0000
committerDavid Turner2011-01-22 01:07:14 +0000
commit39de104c5c78d52fccbd82a3738e3bb9c10b949d (patch)
tree64d4938a10de46671d150871d78777633171bf4e /engines/toon
parente8e6df91062d4098de9a57176cedeaba5122cc79 (diff)
downloadscummvm-rg350-39de104c5c78d52fccbd82a3738e3bb9c10b949d.tar.gz
scummvm-rg350-39de104c5c78d52fccbd82a3738e3bb9c10b949d.tar.bz2
scummvm-rg350-39de104c5c78d52fccbd82a3738e3bb9c10b949d.zip
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
Diffstat (limited to 'engines/toon')
-rw-r--r--engines/toon/toon.cpp5
1 files changed, 5 insertions, 0 deletions
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;