summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2022-11-04 14:04:05 +0000
committerCaolán McNamara <caolanm@redhat.com>2022-11-04 18:32:33 +0100
commit09b452c2e174aa1be3b826198cd3b495b7ede454 (patch)
tree728fe90fc79f05875e7c7c55d5fd961b8069047a /vcl
parente77beab92dfe1136a59c99af6571de6eae9f7e12 (diff)
ofz#53028 Integer-overflow
Change-Id: I08f072e28e182dd8b606a93b5509e7cb38e173e6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142281 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/outdev/hatch.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/vcl/source/outdev/hatch.cxx b/vcl/source/outdev/hatch.cxx
index 9ae44a563c1b..10930bbcb424 100644
--- a/vcl/source/outdev/hatch.cxx
+++ b/vcl/source/outdev/hatch.cxx
@@ -316,7 +316,7 @@ void OutputDevice::CalcHatchValues( const tools::Rectangle& rRect, tools::Long n
{
const double fAngle = std::abs( toRadians(nAngle) );
const double fTan = tan( fAngle );
- const tools::Long nXOff = FRound( ( rRect.Bottom() - rRect.Top() ) / fTan );
+ const tools::Long nXOff = FRound( (static_cast<double>(rRect.Bottom()) - rRect.Top()) / fTan );
tools::Long nPX;
nDist = FRound( nDist / sin( fAngle ) );