From eda34075c12a612ffb17ea39d524467233b288bf Mon Sep 17 00:00:00 2001 From: Strangerke Date: Tue, 25 Feb 2014 08:09:28 +0100 Subject: VOYEUR: Fix some uninitialized variables in ThreadResource --- engines/voyeur/files_threads.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/engines/voyeur/files_threads.cpp b/engines/voyeur/files_threads.cpp index ee626fd4c9..d0addc868f 100644 --- a/engines/voyeur/files_threads.cpp +++ b/engines/voyeur/files_threads.cpp @@ -33,14 +33,22 @@ void ThreadResource::init() { Common::fill(&_useCount[0], &_useCount[8], 0); } -ThreadResource::ThreadResource(BoltFilesState &state, const byte *src): - _vm(state._vm) { +ThreadResource::ThreadResource(BoltFilesState &state, const byte *src):_vm(state._vm) { _stateId = READ_LE_UINT16(&src[0]); _stackId = READ_LE_UINT16(&src[0]); _savedStateId = READ_LE_UINT16(&src[0]); _savedStackId = READ_LE_UINT16(&src[0]); _ctlPtr = nullptr; _aptPos = Common::Point(-1, -1); + + _newStateId = -1; + _newStackId = -1; + _stateFlags = 0; + _stateCount = 0; + _parseCount = 0; + _nextStateId = -1; + _threadInfoPtr = nullptr; + _playCommandsPtr = nullptr; } void ThreadResource::initThreadStruct(int idx, int id) { -- cgit v1.2.3