segmentation: Fix integer underflow check
error: comparison of unsigned expression < 0 is always false [-Werror,-Wtautological-compare]
This commit is contained in:
parent
78d9134d63
commit
50321b1ccd
@ -509,11 +509,13 @@ update_codebook (unsigned char *p, codeBook * c, unsigned *cbBounds,
|
||||
int matchChannel;
|
||||
|
||||
for (n = 0; n < numChannels; n++) {
|
||||
high[n] = *(p + n) + *(cbBounds + n);
|
||||
high[n] = p[n] + cbBounds[n];
|
||||
if (high[n] > 255)
|
||||
high[n] = 255;
|
||||
low[n] = *(p + n) - *(cbBounds + n);
|
||||
if (low[n] < 0)
|
||||
|
||||
if (p[n] > cbBounds[n])
|
||||
low[n] = p[n] - cbBounds[n];
|
||||
else
|
||||
low[n] = 0;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user