coverity#735616 Division or modulo by float zero
Change-Id: I5aaad2cd80e6930cbca57b4df2bfee3a6989ca41
This commit is contained in:
@@ -90,7 +90,7 @@ void SdDocPreviewWin::CalcSizeAndPos( GDIMetaFile* pFile, Size& rSize, Point& rP
|
|||||||
if( nHeight < 0 ) nHeight = 0;
|
if( nHeight < 0 ) nHeight = 0;
|
||||||
|
|
||||||
double dRatio=((double)aTmpSize.Width())/aTmpSize.Height();
|
double dRatio=((double)aTmpSize.Width())/aTmpSize.Height();
|
||||||
double dRatioPreV=((double) nWidth ) / nHeight;
|
double dRatioPreV = nHeight ? (((double) nWidth ) / nHeight) : 0.0;
|
||||||
|
|
||||||
if (dRatio > dRatioPreV)
|
if (dRatio > dRatioPreV)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user