Kaydet (Commit) b929fd7a authored tarafından Caolán McNamara's avatar Caolán McNamara Kaydeden (comit) Michael Stahl

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: 's avatarMichael Stahl <Michael.Stahl@cib.de>
üst 5c5eab35
......@@ -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)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment