From 0f2e6f1fbb42fe33bee3ffd5b5200b17be3382d9 Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Tue, 29 Mar 2016 13:57:42 +0200 Subject: [PATCH] cid#1357164 correct CovertyScan possible DIVIDE_BY_ZERO Also covers cid#1357165, exclude possibility that value equals zero at the same place negative values get excluded Change-Id: If3fd6143fb13f0d29f5fba304f9f337f7a7aa74c Reviewed-on: https://gerrit.libreoffice.org/23592 Reviewed-by: Armin Le Grand Tested-by: Armin Le Grand --- sd/source/ui/view/drviewsh.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sd/source/ui/view/drviewsh.cxx b/sd/source/ui/view/drviewsh.cxx index c2ea1094186a..5d40d0e4d2a4 100644 --- a/sd/source/ui/view/drviewsh.cxx +++ b/sd/source/ui/view/drviewsh.cxx @@ -120,7 +120,7 @@ void DrawViewShell::MakeVisible(const Rectangle& rRect, vcl::Window& rWin) nFreeSpaceX = rRect.GetWidth(); } - if(nFreeSpaceX < 0) + if(nFreeSpaceX <= 0) { SAL_WARN("sd", "The given Rectangle contains values that lead to numerical overflows (!)"); } @@ -165,7 +165,7 @@ void DrawViewShell::MakeVisible(const Rectangle& rRect, vcl::Window& rWin) nFreeSpaceY = rRect.GetHeight(); } - if(nFreeSpaceY < 0) + if(nFreeSpaceY <= 0) { SAL_WARN("sd", "The given Rectangle contains values that lead to numerical overflows (!)"); }