1
0
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:
Pierre Joye
2009-09-03 09:45:56 +00:00
parent 409dbe66d4
commit e5f4d5841e
+1 -1
View File
@@ -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;