[Scummvm-git-logs] scummvm master -> 18c1f2f6e44b67961d9fdcef71e7e6b33cee97d5

Strangerke Strangerke at scummvm.org
Wed Feb 8 15:36:23 CET 2017


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
18c1f2f6e4 CRYO: Fix several issues reported by coverity


Commit: 18c1f2f6e44b67961d9fdcef71e7e6b33cee97d5
    https://github.com/scummvm/scummvm/commit/18c1f2f6e44b67961d9fdcef71e7e6b33cee97d5
Author: Strangerke (strangerke at scummvm.org)
Date: 2017-02-08T15:33:51+01:00

Commit Message:
CRYO: Fix several issues reported by coverity

Changed paths:
    engines/cryo/cryo.cpp
    engines/cryo/eden.cpp


diff --git a/engines/cryo/cryo.cpp b/engines/cryo/cryo.cpp
index 1538ee4..e517c8b 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 08509e4..77d7788 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);





More information about the Scummvm-git-logs mailing list