Fix #812, ensure operands priorty works as expected (#813)

master
Pierre Joye 2022-01-30 11:04:28 +07:00 committed by GitHub
parent d1e2522474
commit ebf0fb1996
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -1996,10 +1996,10 @@ static int getPixelRgbInterpolated(gdImagePtr im, const int tcolor)
int ct;
int i;
b = (unsigned char)tcolor;
g = (unsigned char)tcolor >> 8;
r = (unsigned char)tcolor >> 16;
a = (unsigned char)tcolor >> 24;
b = (unsigned char)(tcolor);
g = (unsigned char)(tcolor >> 8);
r = (unsigned char)(tcolor >> 16);
a = (unsigned char)(tcolor >> 24);
for (i = 0; i < im->colorsTotal; i++) {
if (im->red[i] == r && im->green[i] == g && im->blue[i] == b && im->alpha[i] == a) {