diff options
author | Strangerke | 2013-11-09 14:47:45 +0100 |
---|---|---|
committer | Strangerke | 2013-11-09 14:47:45 +0100 |
commit | e4387e754a5de39cf1407ca11777f49a6b5a9f99 (patch) | |
tree | b82a306b3daedc2e0db19749d5f51b508a0d6776 | |
parent | 4cc7d472d18dc65d932c72bee81c314f896fd65a (diff) | |
download | scummvm-rg350-e4387e754a5de39cf1407ca11777f49a6b5a9f99.tar.gz scummvm-rg350-e4387e754a5de39cf1407ca11777f49a6b5a9f99.tar.bz2 scummvm-rg350-e4387e754a5de39cf1407ca11777f49a6b5a9f99.zip |
AVALANCHE: Fix CID 1109674 - uninitialized variables. Also fix room variable default values.
-rw-r--r-- | engines/avalanche/avalanche.cpp | 26 | ||||
-rw-r--r-- | engines/avalanche/avalot.cpp | 4 |
2 files changed, 28 insertions, 2 deletions
diff --git a/engines/avalanche/avalanche.cpp b/engines/avalanche/avalanche.cpp index ab03cc84e0..beb6333daa 100644 --- a/engines/avalanche/avalanche.cpp +++ b/engines/avalanche/avalanche.cpp @@ -141,6 +141,32 @@ void AvalancheEngine::initVariables() { _seeScroll = false; _currentMouse = 177; _holdLeftMouse = false; + + _jumpStatus = 0; + _mushroomGrowing = false; + _crapulusWillTell = false; + _enterCatacombsFromLustiesRoom = false; + _teetotal = false; + _malagauche = 0; + _drinking = '\0'; + _enteredLustiesRoomAsMonk = false; + _catacombX = 0; + _catacombY = 0; + _avvysInTheCupboard = false; + _geidaFollows = false; + _givenPotionToGeida = false; + _lustieIsAsleep = false; + _beenTiedUp = false; + _sittingInPub = false; + _spurgeTalkCount = 0; + _metAvaroid = false; + _takenMushroom = false; + _givenPenToAyles = false; + _askedDogfoodAboutNim = false; + _ableToAddTimer = false; + _spludwickAtHome = false; + _passedCwytalotInHerts = false; + _lastRoom = _lastRoomNotMap = kRoomDummy; } Common::ErrorCode AvalancheEngine::initialize() { diff --git a/engines/avalanche/avalot.cpp b/engines/avalanche/avalot.cpp index d703fdd2cc..5d360d1c3f 100644 --- a/engines/avalanche/avalot.cpp +++ b/engines/avalanche/avalot.cpp @@ -1458,8 +1458,8 @@ void AvalancheEngine::resetVariables() { _jumpStatus = 0; _mushroomGrowing = false; _spludwickAtHome = false; - _lastRoom = 0; - _lastRoomNotMap = 0; + _lastRoom = kRoomDummy; + _lastRoomNotMap = kRoomDummy; _crapulusWillTell = false; _enterCatacombsFromLustiesRoom = false; _teetotal = false; |