From 1274c02d1d1dc4c0af156e7f769e9155499b67a1 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Fri, 15 Jun 2012 20:39:03 +0200 Subject: MORTEVIELLE: Fix a couple of Valgrind warnings --- engines/mortevielle/mortevielle.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'engines/mortevielle') diff --git a/engines/mortevielle/mortevielle.cpp b/engines/mortevielle/mortevielle.cpp index 8ff7d02c9e..58708f3bcb 100644 --- a/engines/mortevielle/mortevielle.cpp +++ b/engines/mortevielle/mortevielle.cpp @@ -113,8 +113,10 @@ MortevielleEngine::MortevielleEngine(OSystem *system, const ADGameDescription *g _c_zzz = -1; _caff = -1; + _day = 0; memset(_mem, 0, sizeof(_mem)); + _anyone = false; } MortevielleEngine::~MortevielleEngine() { @@ -2483,11 +2485,12 @@ void MortevielleEngine::loadCFIEC() { } _cfiecBufferSize = ((f.size() / 128) + 1) * 128; + int32 fileSize = f.size(); if (!_reloadCFIEC) _cfiecBuffer = (byte *)malloc(sizeof(byte) * _cfiecBufferSize); - for (int i = 0; i < _cfiecBufferSize; ++i) + for (int32 i = 0; i < fileSize; ++i) _cfiecBuffer[i] = f.readByte(); f.close(); -- cgit v1.2.3