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 <Armin.Le.Grand@cib.de> Tested-by: Armin Le Grand <Armin.Le.Grand@cib.de>
This commit is contained in:
@@ -120,7 +120,7 @@ void DrawViewShell::MakeVisible(const Rectangle& rRect, vcl::Window& rWin)
|
|||||||
nFreeSpaceX = rRect.GetWidth();
|
nFreeSpaceX = rRect.GetWidth();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(nFreeSpaceX < 0)
|
if(nFreeSpaceX <= 0)
|
||||||
{
|
{
|
||||||
SAL_WARN("sd", "The given Rectangle contains values that lead to numerical overflows (!)");
|
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();
|
nFreeSpaceY = rRect.GetHeight();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(nFreeSpaceY < 0)
|
if(nFreeSpaceY <= 0)
|
||||||
{
|
{
|
||||||
SAL_WARN("sd", "The given Rectangle contains values that lead to numerical overflows (!)");
|
SAL_WARN("sd", "The given Rectangle contains values that lead to numerical overflows (!)");
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user