[Scummvm-cvs-logs] scummvm master -> 558f404e62ca0139623ed7eefd7edc96ab1d1f7f

Strangerke Strangerke at scummvm.org
Thu Aug 22 00:43:42 CEST 2013


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:
558f404e62 MORTEVIELLE: Use similar check in fctClose and fctSearch than in fctSelfPut


Commit: 558f404e62ca0139623ed7eefd7edc96ab1d1f7f
    https://github.com/scummvm/scummvm/commit/558f404e62ca0139623ed7eefd7edc96ab1d1f7f
Author: Strangerke (strangerke at scummvm.org)
Date: 2013-08-21T15:42:17-07:00

Commit Message:
MORTEVIELLE: Use similar check in fctClose and fctSearch than in fctSelfPut

Changed paths:
    engines/mortevielle/actions.cpp



diff --git a/engines/mortevielle/actions.cpp b/engines/mortevielle/actions.cpp
index c0d4963..b68dd48 100644
--- a/engines/mortevielle/actions.cpp
+++ b/engines/mortevielle/actions.cpp
@@ -523,9 +523,12 @@ void MortevielleEngine::fctSearch() {
 		setCoordinates(7);
 		if (_num != 0) {
 			int i;
-			for (i = 1; (i <= 6) && (_num != _openObjects[i]); i++)
-				;
-			if (_num == _openObjects[i]) {
+			for (i = 1; i <= 6; i++) {
+				if (_num == _openObjects[i])
+					break;
+			}
+
+			if (i <= 6) {
 				if (_currBitIndex > 0)
 					_coreVar._faithScore += 3;
 
@@ -913,9 +916,12 @@ void MortevielleEngine::fctClose() {
 		setCoordinates(7);
 		if (_num != 0) {
 			int i;
-			for (i = 1; (i <= 6) && (_num != _openObjects[i]); ++i)
-				;
-			if (_num == _openObjects[i]) {
+			for (i = 1; i <= 6; ++i) {
+				if (_num == _openObjects[i])
+					break;
+			}
+
+			if (i <= 6) {
 				displayAnimFrame(2, _num);
 				_crep = 998;
 				_openObjects[i] = 0;






More information about the Scummvm-git-logs mailing list