[Scummvm-cvs-logs] SF.net SVN: scummvm:[53291] scummvm/trunk/engines/sword25/gfx/opengl/ glimage.cpp
sev at users.sourceforge.net
sev at users.sourceforge.net
Wed Oct 13 01:18:38 CEST 2010
Revision: 53291
http://scummvm.svn.sourceforge.net/scummvm/?rev=53291&view=rev
Author: sev
Date: 2010-10-12 23:18:38 +0000 (Tue, 12 Oct 2010)
Log Message:
-----------
SWORD25: Bugfix for clipping error causing crash
The CLIP() macro won't work as desired if the max value is less than the min value. Hence the need for the extra MAX() added into the two lines.
Modified Paths:
--------------
scummvm/trunk/engines/sword25/gfx/opengl/glimage.cpp
Modified: scummvm/trunk/engines/sword25/gfx/opengl/glimage.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/opengl/glimage.cpp 2010-10-12 23:18:16 UTC (rev 53290)
+++ scummvm/trunk/engines/sword25/gfx/opengl/glimage.cpp 2010-10-12 23:18:38 UTC (rev 53291)
@@ -196,8 +196,8 @@
PosY = 0;
}
- w = CLIP(w, 0, (int)_backSurface->w - PosX - 1);
- h = CLIP(h, 0, (int)_backSurface->h - PosY - 1);
+ w = CLIP(w, 0, MAX((int)_backSurface->w - PosX - 1, 0));
+ h = CLIP(h, 0, MAX((int)_backSurface->h - PosY - 1, 0));
if (w == 0 || h == 0)
return true;
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