--- gd.c	2007-07-18 22:33:12.000000000 -0700
+++ gd.c.good	2007-07-18 22:32:55.000000000 -0700
@@ -3091,6 +3091,16 @@
 		(float) (y2 - y1) + 0.5 + x1);
 	    }
 	}
+
+
+      // This is needed because sometimes you can end up with an odd
+      // number of ints...
+      if(1 == ints%2)
+      {
+	      im->polyInts[ints] = im->polyInts[ints-1];
+      }
+
+
       /* 
         2.0.26: polygons pretty much always have less than 100 points,
         and most of the time they have considerably less. For such trivial
@@ -3106,6 +3116,10 @@
         }
         im->polyInts[j] = index;
       }
+
+
+
+
       for (i = 0; (i < (ints)); i += 2)
 	{
 #if 0
