basebmp/source/bitmapdevice.cxx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)
New commits: commit 3d67253be08fba7b717332a23ffbe6f2cb6c2a53 Author: Caolán McNamara <[email protected]> Date: Thu Jul 18 09:43:39 2013 +0100 WaE: assuming signed overflow does not occur when assuming... that (X + c) < X is always false [-Wstrict-overflow] (cherry picked from commit 37a3f9638315483114380a461f60abeab7809a3d) Change-Id: I63880bf27ab7e34eb9e0be682b39b80b71d65103 Reviewed-on: https://gerrit.libreoffice.org/4963 Reviewed-by: Andras Timar <[email protected]> Tested-by: Andras Timar <[email protected]> diff --git a/basebmp/source/bitmapdevice.cxx b/basebmp/source/bitmapdevice.cxx index d1a19f9..2833b12 100644 --- a/basebmp/source/bitmapdevice.cxx +++ b/basebmp/source/bitmapdevice.cxx @@ -336,8 +336,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 ) ); }
_______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
