[Scummvm-cvs-logs] SF.net SVN: scummvm:[48848] scummvm/branches/branch-1-1-0/engines/ parallaction/walk.cpp

wjpalenstijn at users.sourceforge.net wjpalenstijn at users.sourceforge.net
Thu Apr 29 01:17:00 CEST 2010


Revision: 48848
          http://scummvm.svn.sourceforge.net/scummvm/?rev=48848&view=rev
Author:   wjpalenstijn
Date:     2010-04-28 23:17:00 +0000 (Wed, 28 Apr 2010)

Log Message:
-----------
Backport r48846: Make sure walk coordinate are valid before checking path buffer.

Modified Paths:
--------------
    scummvm/branches/branch-1-1-0/engines/parallaction/walk.cpp

Modified: scummvm/branches/branch-1-1-0/engines/parallaction/walk.cpp
===================================================================
--- scummvm/branches/branch-1-1-0/engines/parallaction/walk.cpp	2010-04-28 23:11:34 UTC (rev 48847)
+++ scummvm/branches/branch-1-1-0/engines/parallaction/walk.cpp	2010-04-28 23:17:00 UTC (rev 48848)
@@ -73,10 +73,10 @@
 	int16 left = to.x;
 	do {
 		right++;
-	} while (!IS_PATH_CLEAR(right, to.y) && (right < maxX));
+	} while ((right < maxX) && !IS_PATH_CLEAR(right, to.y));
 	do {
 		left--;
-	} while (!IS_PATH_CLEAR(left, to.y) && (left > 0));
+	} while ((left > 0) && !IS_PATH_CLEAR(left, to.y));
 	right = (right == maxX) ? 1000 : right - to.x;
 	left = (left == 0) ? 1000 : to.x - left;
 
@@ -85,10 +85,10 @@
 	int16 bottom = to.y;
 	do {
 		top--;
-	} while (!IS_PATH_CLEAR(to.x, top) && (top > 0));
+	} while ((top > 0) && !IS_PATH_CLEAR(to.x, top));
 	do {
 		bottom++;
-	} while (!IS_PATH_CLEAR(to.x, bottom) && (bottom < maxY));
+	} while ((bottom < maxY) && !IS_PATH_CLEAR(to.x, bottom) );
 	top = (top == 0) ? 1000 : to.y - top;
 	bottom = (bottom == maxY) ? 1000 : bottom - to.y;
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list