Commits

Remi Collet committed da6c203

fix palette copy in gdimageclone

  • Participants
  • Parent commits 87eb546

Comments (0)

Files changed (1)

 	if (src->trueColor == 0) {
 		dst->colorsTotal = src->colorsTotal;
 		for (i = 0; i < gdMaxColors; i++) {
-			dst->red[gdMaxColors]   = src->red[gdMaxColors];
-			dst->green[gdMaxColors] = src->green[gdMaxColors];
-			dst->blue[gdMaxColors]  = src->blue[gdMaxColors];
-			dst->alpha[gdMaxColors] = src->alpha[gdMaxColors];
-			dst->open[gdMaxColors]  = src->open[gdMaxColors];
+			dst->red[i]   = src->red[i];
+			dst->green[i] = src->green[i];
+			dst->blue[i]  = src->blue[i];
+			dst->alpha[i] = src->alpha[i];
+			dst->open[i]  = src->open[i];
 		}
 		for (i = 0; i < src->sy; i++) {
 			for (x = 0; x < src->sx; x++) {