From a56d0886481e3a8d30c7f2a5e53ac40bf1473cea Mon Sep 17 00:00:00 2001 From: marha Date: Wed, 16 Feb 2011 06:42:50 +0000 Subject: Type cast width to short to avoid type cast exception in debug version when width is negative. --- xorg-server/miext/damage/damage.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'xorg-server/miext') diff --git a/xorg-server/miext/damage/damage.c b/xorg-server/miext/damage/damage.c index d82ea0f6e..7d58d134b 100644 --- a/xorg-server/miext/damage/damage.c +++ b/xorg-server/miext/damage/damage.c @@ -1331,9 +1331,9 @@ damagePolyFillRect(DrawablePtr pDrawable, int nRectsTmp = nRects; box.x1 = pRectsTmp->x; - box.x2 = box.x1 + pRectsTmp->width; + box.x2 = box.x1 + (short)pRectsTmp->width; box.y1 = pRectsTmp->y; - box.y2 = box.y1 + pRectsTmp->height; + box.y2 = box.y1 + (short)pRectsTmp->height; while(--nRectsTmp) { -- cgit v1.2.3