coverity#1222233 Division or modulo by zero
Change-Id: I699dc60b67d9417a8ac3848c03d7352f9f8ff12d
This commit is contained in:
@@ -861,9 +861,16 @@ void scaleNonPalleteGeneral2(BitmapReadAccess* pAcc, BitmapWriteAccess* pWAcc,
|
||||
else if ( nLineRange == i )
|
||||
nWeightY = pMapFY[ nBottom ];
|
||||
|
||||
nSumB += nWeightY * ( nSumRowB / nTotalWeightX );
|
||||
nSumG += nWeightY * ( nSumRowG / nTotalWeightX );
|
||||
nSumR += nWeightY * ( nSumRowR / nTotalWeightX );
|
||||
if (nTotalWeightX)
|
||||
{
|
||||
nSumRowB /= nTotalWeightX;
|
||||
nSumRowG /= nTotalWeightX;
|
||||
nSumRowR /= nTotalWeightX;
|
||||
}
|
||||
|
||||
nSumB += nWeightY * nSumRowB;
|
||||
nSumG += nWeightY * nSumRowG;
|
||||
nSumR += nWeightY * nSumRowR;
|
||||
nTotalWeightY += nWeightY;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user