summaryrefslogtreecommitdiff
path: root/vcl/source/gdi
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-04-18 10:24:19 +0100
committerMichael Stahl <Michael.Stahl@cib.de>2019-04-23 13:09:22 +0200
commitb929fd7a369630fa70a74eec3040761cea58b660 (patch)
tree07d385bd2a0b2c6dc795b2f3d2b0840dac27d70b /vcl/source/gdi
parent5c5eab3522368d6baa7ab6ef1b6c9f5eaaab4fad (diff)
forcepoint#78 large double cast to sal_Int32 wraps to neg
Change-Id: I831d0dd62d0b28dc19b90b03de3eaa159984347c Reviewed-on: https://gerrit.libreoffice.org/70923 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
Diffstat (limited to 'vcl/source/gdi')
-rw-r--r--vcl/source/gdi/bmpacc.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/vcl/source/gdi/bmpacc.cxx b/vcl/source/gdi/bmpacc.cxx
index f970c93428ce..bb9db3d3b862 100644
--- a/vcl/source/gdi/bmpacc.cxx
+++ b/vcl/source/gdi/bmpacc.cxx
@@ -221,8 +221,8 @@ BitmapColor BitmapReadAccess::GetInterpolatedColorWithFallback( double fY, doubl
// double values, e.g. static_cast< sal_Int32 >(-0.25) is 0, not -1, but *has* to be outside (!)
if(mpBuffer && fX >= 0.0 && fY >= 0.0)
{
- const sal_Int32 nX(static_cast< sal_Int32 >(fX));
- const sal_Int32 nY(static_cast< sal_Int32 >(fY));
+ const sal_Int64 nX(static_cast<sal_Int64>(fX));
+ const sal_Int64 nY(static_cast<sal_Int64>(fY));
if(nX < mpBuffer->mnWidth && nY < mpBuffer->mnHeight)
{