aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTorbjörn Andersson2008-08-10 18:44:00 +0000
committerTorbjörn Andersson2008-08-10 18:44:00 +0000
commit9d0b0523cf119fdc400bf477c2f9d6f4f37ddce6 (patch)
tree33ce7bc38d1fcf3d823122a9a855a0500103ea45
parentd08c3ba66ba81a06ef681ea9a49334a80d296609 (diff)
downloadscummvm-rg350-9d0b0523cf119fdc400bf477c2f9d6f4f37ddce6.tar.gz
scummvm-rg350-9d0b0523cf119fdc400bf477c2f9d6f4f37ddce6.tar.bz2
scummvm-rg350-9d0b0523cf119fdc400bf477c2f9d6f4f37ddce6.zip
Fixed a bunch of Valgrind warnings (mostly uninitialised variables, but also an
invalid free()), so that I can start and quit the game without any unexpected warnings. (The obvious next step, of course, would be to actually *play* the game for a bit...) svn-id: r33766
-rw-r--r--engines/drascula/drascula.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp
index e8e4ea94b9..2d24978f21 100644
--- a/engines/drascula/drascula.cpp
+++ b/engines/drascula/drascula.cpp
@@ -162,6 +162,12 @@ int DrasculaEngine::init() {
_textmisc = 0;
_textd1 = 0;
+ _color = 0;
+ blinking = 0;
+ leftMouseButton = 0;
+ rightMouseButton = 0;
+ *textName = 0;
+
if (!loadDrasculaDat())
return 1;
@@ -1020,7 +1026,7 @@ void DrasculaEngine::freeTexts(char ***ptr) {
for (int lang = 0; lang < _numLangs; lang++) {
if (ptr[lang]) {
- free(ptr[lang][0] - DATAALIGNMENT);
+ free(ptr[lang][0]);
free(ptr[lang]);
}
}