Commits

Remi Collet  committed 4e00e33

more trivial case in gdImageRotate (cover -360 to 360)

  • Participants
  • Parent commits b10c776

Comments (0)

Files changed (1)

File src/gd_interpolation.c

 	/* no interpolation needed here */
 	switch (angle_rounded) {
 
-		case 0: {
+		case  36000:
+		case -36000:
+		case      0: {
 			gdImagePtr dst = gdImageClone(src);
 
 			if (dst == NULL) {
 			return dst;
 		}
 
-		case 9000:
+		case -27000:
+		case   9000:
 			return gdImageRotate90(src, 0);
-		case 18000:
+
+		case -18000:
+		case  18000:
 			return gdImageRotate180(src, 0);
+
+		case -9000:
 		case 27000:
 			return gdImageRotate270(src, 0);
 	}