Index: /trunk/pswarp/src/pswarpPixelFraction.c
===================================================================
--- /trunk/pswarp/src/pswarpPixelFraction.c	(revision 15609)
+++ /trunk/pswarp/src/pswarpPixelFraction.c	(revision 15610)
@@ -39,5 +39,5 @@
     long numPix = numCols * numRows;
 
-    int numBad = 0;                     // Number of bad pixels
+    long numBad = 0;                     // Number of bad pixels
     for (int y = 0; y < numRows; y++) {
         for (int x = 0; x < numCols; x++) {
@@ -48,5 +48,5 @@
     }
 
-    float goodFrac = (numPix - numBad) / numPix; // Fraction of good pixels
+    float goodFrac = (numPix - numBad) / (float)numPix; // Fraction of good pixels
     bool accept = (goodFrac >= minFrac ? true : false); // Accept this readout?
 
