Index: gimpdrawable-transform.c
===================================================================
RCS file: /cvs/gnome/gimp/app/core/gimpdrawable-transform.c,v
retrieving revision 1.99
diff -u -p -r1.99 gimpdrawable-transform.c
--- gimpdrawable-transform.c	15 Jun 2004 08:18:13 -0000	1.99
+++ gimpdrawable-transform.c	16 Jun 2004 06:11:17 -0000
@@ -403,6 +403,13 @@ gimp_drawable_transform_tiles_affine (Gi
                 {
                   guchar color[MAX_CHANNELS];
 
+                  /* clamp texture coordinates */
+                  for (b = 0; b < 5; b++)
+                    {
+                      u[b] = CLAMP (u[b], u1, u2 - 1);
+                      v[b] = CLAMP (v[b], v1, v2 - 1);
+                    }
+
                   if (supersample &&
                       supersample_dtest (u[1], v[1], u[2], v[2],
                                          u[3], v[3], u[4], v[4]))
