coverity#1222229 Division or modulo by zero
Change-Id: I97fd23d19a96665b91154ed260c677f0f76fee47
This commit is contained in:
@@ -372,9 +372,16 @@ void scalePallete8bit2(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