added casts to prevent unitended overflows
This commit is contained in:
parent
122093bef4
commit
31445c5ed9
|
@ -457,7 +457,7 @@ void opj_calculate_norms(OPJ_FLOAT64 * pNorms,
|
|||
for (j = 0; j < pNbComps; ++j) {
|
||||
lCurrentValue = lMatrix[lIndex];
|
||||
lIndex += pNbComps;
|
||||
lNorms[i] += lCurrentValue * lCurrentValue;
|
||||
lNorms[i] += (OPJ_FLOAT64) lCurrentValue * lCurrentValue;
|
||||
}
|
||||
lNorms[i] = sqrt(lNorms[i]);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue