summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/gd/libgd/gdxpm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/gd/libgd/gdxpm.c b/ext/gd/libgd/gdxpm.c
index 5663837aee..cdfe63c2cf 100644
--- a/ext/gd/libgd/gdxpm.c
+++ b/ext/gd/libgd/gdxpm.c
@@ -46,10 +46,10 @@ gdImagePtr gdImageCreateFromXpm (char *filename)
buf[0] = image.colorTable[i].c_color[1];
red = strtol(buf, NULL, 16);
- buf[0] = image.colorTable[i].c_color[3];
+ buf[0] = image.colorTable[i].c_color[2];
green = strtol(buf, NULL, 16);
- buf[0] = image.colorTable[i].c_color[5];
+ buf[0] = image.colorTable[i].c_color[3];
blue = strtol(buf, NULL, 16);
break;