diff options
author | Strangerke | 2017-02-08 15:33:51 +0100 |
---|---|---|
committer | Strangerke | 2017-02-08 15:33:51 +0100 |
commit | 18c1f2f6e44b67961d9fdcef71e7e6b33cee97d5 (patch) | |
tree | 4dde0035812e5c238d33268460b5001e8f1ea3f1 | |
parent | f0f6915e5238063b83ef2d15482c64039c4b2756 (diff) | |
download | scummvm-rg350-18c1f2f6e44b67961d9fdcef71e7e6b33cee97d5.tar.gz scummvm-rg350-18c1f2f6e44b67961d9fdcef71e7e6b33cee97d5.tar.bz2 scummvm-rg350-18c1f2f6e44b67961d9fdcef71e7e6b33cee97d5.zip |
CRYO: Fix several issues reported by coverity
-rw-r--r-- | engines/cryo/cryo.cpp | 1 | ||||
-rw-r--r-- | engines/cryo/eden.cpp | 7 |
2 files changed, 4 insertions, 4 deletions
diff --git a/engines/cryo/cryo.cpp b/engines/cryo/cryo.cpp index 1538ee4110..e517c8b276 100644 --- a/engines/cryo/cryo.cpp +++ b/engines/cryo/cryo.cpp @@ -65,6 +65,7 @@ CryoEngine::CryoEngine(OSystem *syst, const ADGameDescription *gameDesc) : Engin _screenView = nullptr; _showHotspots = false; + _timerTicks = 0; g_ed = this; } diff --git a/engines/cryo/eden.cpp b/engines/cryo/eden.cpp index 08509e4c11..77d77886b7 100644 --- a/engines/cryo/eden.cpp +++ b/engines/cryo/eden.cpp @@ -6508,8 +6508,8 @@ void EdenGame::persovox() { _voiceSamplesSize = loadSound(num); int16 volumeLeft = _globals->_prefSoundVolume[0]; int16 volumeRight = _globals->_prefSoundVolume[1]; - int16 stepLeft = _musicChannel->_volumeLeft < volumeLeft ? stepLeft = 1 : -1; - int16 stepRight = _musicChannel->_volumeRight < volumeRight ? stepRight = 1 : -1; + int16 stepLeft = _musicChannel->_volumeLeft < volumeLeft ? 1 : -1; + int16 stepRight = _musicChannel->_volumeRight < volumeRight ? 1 : -1; do { if (volumeLeft != _musicChannel->_volumeLeft) _musicChannel->setVolumeLeft(_musicChannel->_volumeLeft + stepLeft); @@ -7326,8 +7326,7 @@ void EdenGame::displayPanel() { // Original name: afflangue void EdenGame::displayLanguage() { useBank(65); - if (_globals->_prefLanguage < 0 //TODO: never happens - || _globals->_prefLanguage > 5) + if (_globals->_prefLanguage > 5) return; noclipax(6, 8, _globals->_prefLanguage * 9 + 43); //TODO: * FONT_HEIGHT noclipax(7, 77, _globals->_prefLanguage * 9 + 44); |