You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
1.2 KiB
38 lines
1.2 KiB
From 37a3f9638315483114380a461f60abeab7809a3d Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
|
|
Date: Thu, 18 Jul 2013 09:43:39 +0100
|
|
Subject: [PATCH] WaE: assuming signed overflow does not occur when assuming...
|
|
|
|
that (X + c) < X is always false [-Wstrict-overflow]
|
|
|
|
Change-Id: I63880bf27ab7e34eb9e0be682b39b80b71d65103
|
|
---
|
|
basebmp/source/bitmapdevice.cxx | 11 +++++++++--
|
|
1 file changed, 9 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/basebmp/source/bitmapdevice.cxx b/basebmp/source/bitmapdevice.cxx
|
|
index fb08e32..00fc1c2 100644
|
|
--- a/basebmp/source/bitmapdevice.cxx
|
|
+++ b/basebmp/source/bitmapdevice.cxx
|
|
@@ -339,8 +339,15 @@ namespace
|
|
{
|
|
if( !mpDamage )
|
|
return;
|
|
- basegfx::B2IPoint aEnd( rDamagePoint.getX() + 1,
|
|
- rDamagePoint.getY() + 1 );
|
|
+
|
|
+ sal_Int32 nX(rDamagePoint.getX());
|
|
+ sal_Int32 nY(rDamagePoint.getY());
|
|
+ if (nX < SAL_MAX_INT32)
|
|
+ ++nX;
|
|
+ if (nY < SAL_MAX_INT32)
|
|
+ ++nY;
|
|
+
|
|
+ basegfx::B2IPoint aEnd( nX, nY );
|
|
damaged( basegfx::B2IBox( rDamagePoint, aEnd ) );
|
|
}
|
|
|
|
--
|
|
1.8.3.1
|
|
|