diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-04-18 10:24:19 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-04-18 12:26:35 +0200 |
commit | 314d101b1336748b22df6582e7aacd455aa4171f (patch) | |
tree | 10c4b8a7332f99fc3b7ed901d00f2d958bd51a7d /vcl | |
parent | 56bc0b1a376f62570a7287e9bb4193e00360c978 (diff) |
forcepoint#78 large double cast to sal_Int32 wraps to neg
Change-Id: I831d0dd62d0b28dc19b90b03de3eaa159984347c
Reviewed-on: https://gerrit.libreoffice.org/70922
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/gdi/bmpacc.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/vcl/source/gdi/bmpacc.cxx b/vcl/source/gdi/bmpacc.cxx index a0b9427b24b1..a03147696c7e 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) { |