Index: /trunk/magic/remove/src/diffedpixels.c
===================================================================
--- /trunk/magic/remove/src/diffedpixels.c	(revision 27347)
+++ /trunk/magic/remove/src/diffedpixels.c	(revision 27348)
@@ -1,6 +1,4 @@
 #include "streaksremove.h"
 #include "pmAstrometryWCS.h"
-
-#define DEBUG_PRINT 1
 
 static void addTouchedPixels(streakFiles *sf, psString fileName);
@@ -148,6 +146,6 @@
 #endif
     for (int y = ymin ; y <= ymax; y++) {
-        int xleft  = xLeft(pt, y);
-        int xright = xRight(pt, y);
+        int xleft  = xLeft(pt, y) - 1;
+        int xright = xRight(pt, y) + 1;
 
         if (xleft < 0) {
@@ -197,5 +195,5 @@
         x_d = xOfY(&pt[0], &pt[3], y);
     }
-    return (int) (x_d + 0.5);
+    return (int) floor(x_d);
 }
 
@@ -211,5 +209,5 @@
         x_d = xOfY(&pt[2], &pt[3], y);
     }
-    return (int) x_d;
+    return (int) ceil(x_d);
 }
 
