mirror of
https://github.com/php/php-src.git
synced 2026-04-25 08:58:28 +02:00
- Fix sanity check for the color index in imagecolortransparent
This commit is contained in:
+1
-1
@@ -595,7 +595,7 @@ void gdImageColorTransparent (gdImagePtr im, int color)
|
||||
if (im->transparent != -1) {
|
||||
im->alpha[im->transparent] = gdAlphaOpaque;
|
||||
}
|
||||
if (color > -1 && color<im->colorsTotal && color<=gdMaxColors) {
|
||||
if (color > -1 && color < im->colorsTotal && color < gdMaxColors) {
|
||||
im->alpha[color] = gdAlphaTransparent;
|
||||
} else {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user