diff options
author | Pierre Joye <pierre.php@gmail.com> | 2022-01-30 11:04:28 +0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-30 11:04:28 +0700 |
commit | ebf0fb19960f6e2c74268b4290a3897f0c8ce67b (patch) | |
tree | e7afe01a2ec575fc42012cb96a9a8ae50eea2aaa | |
parent | d1e2522474d4f3538731688d7b40df29b143241a (diff) | |
download | libgd-ebf0fb19960f6e2c74268b4290a3897f0c8ce67b.tar.gz |
Fix #812, ensure operands priorty works as expected (#813)
-rw-r--r-- | src/gd_interpolation.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gd_interpolation.c b/src/gd_interpolation.c index 11c2446..1f625dd 100644 --- a/src/gd_interpolation.c +++ b/src/gd_interpolation.c @@ -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) { |