[Scummvm-cvs-logs] SF.net SVN: scummvm:[50312] scummvm/trunk/engines/m4/mads_views.cpp

dreammaster at users.sourceforge.net dreammaster at users.sourceforge.net
Sat Jun 26 13:14:39 CEST 2010


Revision: 50312
          http://scummvm.svn.sourceforge.net/scummvm/?rev=50312&view=rev
Author:   dreammaster
Date:     2010-06-26 11:14:38 +0000 (Sat, 26 Jun 2010)

Log Message:
-----------
Bugfix to dirty area handling to prevent creation of invalid rects

Modified Paths:
--------------
    scummvm/trunk/engines/m4/mads_views.cpp

Modified: scummvm/trunk/engines/m4/mads_views.cpp
===================================================================
--- scummvm/trunk/engines/m4/mads_views.cpp	2010-06-26 10:51:38 UTC (rev 50311)
+++ scummvm/trunk/engines/m4/mads_views.cpp	2010-06-26 11:14:38 UTC (rev 50312)
@@ -738,9 +738,12 @@
 		--bounds.left;
 		++width;
 	}
-	int right = bounds.left + width;
+
 	if (bounds.left < 0)
 		bounds.left = 0;
+	else if (bounds.left > maxWidth)
+		bounds.left = maxWidth;
+	int right = bounds.left + width;
 	if (right < 0)
 		right = 0;
 	if (right > maxWidth)
@@ -752,6 +755,8 @@
 
 	if (bounds.top < 0)
 		bounds.top = 0;
+	else if (bounds.top > maxHeight)
+		bounds.top = maxHeight;
 	int bottom = bounds.top + height;
 	if (bottom < 0)
 		bottom = 0;


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