summaryrefslogtreecommitdiff
path: root/ext/gd/libgd/gd.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/gd/libgd/gd.c')
-rw-r--r--ext/gd/libgd/gd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/gd/libgd/gd.c b/ext/gd/libgd/gd.c
index 540605a9a5..9b9413320c 100644
--- a/ext/gd/libgd/gd.c
+++ b/ext/gd/libgd/gd.c
@@ -255,7 +255,7 @@ int gdImageColorClosestAlpha (gdImagePtr im, int r, int g, int b, int a)
gd = im->green[i] - g;
bd = im->blue[i] - b;
/* gd 2.02: whoops, was - b (thanks to David Marwood) */
- ad = im->blue[i] - a;
+ ad = im->alpha[i] - a;
dist = rd * rd + gd * gd + bd * bd + ad * ad;
if (first || (dist < mindist)) {
mindist = dist;