ASYLUM: Fix Uninitialized Variable Accesses Identified by Valgrind

This commit is contained in:
D G Turner 2021-05-08 14:37:19 +01:00 committed by Eugene Sandulenko
parent 93f08cc43d
commit b4a0418525
No known key found for this signature in database
GPG Key ID: 014D387312D34F08
2 changed files with 2 additions and 1 deletions

View File

@ -79,7 +79,7 @@ Common::String Encounter::ScriptEntry::toString() {
}
Encounter::Encounter(AsylumEngine *engine) : _vm(engine),
_index(0), _speechResourceId(0), _item(NULL), _objectId1(kObjectNone), _objectId2(kObjectNone), _objectId3(kObjectNone),
_index(0), _speechResourceId(0), _soundResourceId(kResourceNone), _item(NULL), _objectId1(kObjectNone), _objectId2(kObjectNone), _objectId3(kObjectNone),
_actorIndex(kActorInvalid), _shouldEnablePlayer(false), _wasPlayerDisabled(false), _isClosing(false), _isScriptRunning(false) {
memset(&_keywordIndexes, 0, sizeof(_keywordIndexes));

View File

@ -293,6 +293,7 @@ void ScriptManager::reset(uint32 count) {
_exit = false;
_processNextEntry = false;
_lastProcessedCmd = NULL;
_currentScript = NULL;
_currentQueueEntry = NULL;
}