aboutsummaryrefslogtreecommitdiff
path: root/engines/hugo/hugo.cpp
diff options
context:
space:
mode:
authorstrangerke2011-04-24 22:29:27 +0200
committerstrangerke2011-04-24 22:29:27 +0200
commit4f708b021269c67da42177df8170a86d073c6e49 (patch)
tree088f4ea5df80138d294f8c94794e16bebee6d3d6 /engines/hugo/hugo.cpp
parent06ef66cd35b9185305cf2244108d51eff4859bff (diff)
downloadscummvm-rg350-4f708b021269c67da42177df8170a86d073c6e49.tar.gz
scummvm-rg350-4f708b021269c67da42177df8170a86d073c6e49.tar.bz2
scummvm-rg350-4f708b021269c67da42177df8170a86d073c6e49.zip
HUGO: Hopefully fix the valgrind error reported by Digitall in bug #3292391
Diffstat (limited to 'engines/hugo/hugo.cpp')
-rw-r--r--engines/hugo/hugo.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/engines/hugo/hugo.cpp b/engines/hugo/hugo.cpp
index ba87f58150..32247be2da 100644
--- a/engines/hugo/hugo.cpp
+++ b/engines/hugo/hugo.cpp
@@ -53,7 +53,7 @@ HugoEngine *HugoEngine::s_Engine = 0;
HugoEngine::HugoEngine(OSystem *syst, const HugoGameDescription *gd) : Engine(syst), _gameDescription(gd),
_hero(0), _heroImage(0), _defltTunes(0), _numScreens(0), _tunesNbr(0), _soundSilence(0), _soundTest(0),
- _screenStates(0), _score(0), _maxscore(0), _lastTime(0), _curTime(0), _episode(0)
+ _screenStates(0), _numStates(0), _score(0), _maxscore(0), _lastTime(0), _curTime(0), _episode(0)
{
_system = syst;
DebugMan.addDebugChannel(kDebugSchedule, "Schedule", "Script Schedule debug level");
@@ -463,6 +463,7 @@ bool HugoEngine::loadHugoDat() {
for (int varnt = 0; varnt < _numVariant; varnt++) {
numElem = in.readUint16BE();
if (varnt == _gameVariant) {
+ _numStates = numElem;
_screenStates = (byte *)malloc(sizeof(byte) * numElem);
memset(_screenStates, 0, sizeof(_screenStates));
}