Fix some coverity issues
This commit is contained in:
@@ -243,7 +243,7 @@ inline void RawImageSource::interpolate_row_rb (float* ar, float* ab, float* pg,
|
||||
n++;
|
||||
}
|
||||
|
||||
r = cg[j] + r / n;
|
||||
r = cg[j] + r / std::max(n, 1);
|
||||
|
||||
ar[j] = r;
|
||||
} else {
|
||||
@@ -368,7 +368,7 @@ inline void RawImageSource::interpolate_row_rb_mul_pp (float* ar, float* ab, flo
|
||||
n++;
|
||||
}
|
||||
|
||||
r = g_mul * cg[j] + r / n;
|
||||
r = g_mul * cg[j] + r / std::max(n, 1);
|
||||
|
||||
ar[jx] = r;
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user