Explorar o código

Fixed a bug in RectI clipping code

Marko Pintera %!s(int64=12) %!d(string=hai) anos
pai
achega
c853b80d25
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      CamelotUtility/Source/CmRectI.cpp

+ 2 - 2
CamelotUtility/Source/CmRectI.cpp

@@ -75,8 +75,8 @@ namespace CamelotFramework
 
 		x = newLeft;
 		y = newTop;
-		width = newRight - newLeft;
-		height = newBottom - newTop;
+		width = std::max(0, newRight - newLeft);
+		height = std::max(0, newBottom - newTop);
 	}
 
 	void RectI::transform(const Matrix4& matrix)