Ver Fonte

Fixed rect intersect when there is no interesction.

bkaradzic há 12 anos atrás
pai
commit
44231e9c7f
1 ficheiros alterados com 2 adições e 2 exclusões
  1. 2 2
      src/bgfx_p.h

+ 2 - 2
src/bgfx_p.h

@@ -190,8 +190,8 @@ namespace bgfx
 			const uint16_t ey = uint16_min(_a.m_y + _a.m_height, _b.m_y + _b.m_height);
 			const uint16_t ey = uint16_min(_a.m_y + _a.m_height, _b.m_y + _b.m_height);
 			m_x = sx;
 			m_x = sx;
 			m_y = sy;
 			m_y = sy;
-			m_width  = ex - sx;
-			m_height = ey - sy;
+			m_width  = (uint16_t)uint32_satsub(ex, sx);
+			m_height = (uint16_t)uint32_satsub(ey, sy);
 		}
 		}
 
 
 		uint16_t m_x;
 		uint16_t m_x;