Index: trunk/psLib/src/imageops/psImageStats.c
===================================================================
--- trunk/psLib/src/imageops/psImageStats.c	(revision 6940)
+++ trunk/psLib/src/imageops/psImageStats.c	(revision 6959)
@@ -9,6 +9,6 @@
  *  @author GLG, MHPCC
  *
- *  @version $Revision: 1.94 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2006-04-21 21:07:47 $
+ *  @version $Revision: 1.95 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2006-04-22 20:52:30 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -750,9 +750,9 @@
         return -1;
     }/* else if (col0 == col1 && row0 == row1) {
-                        psError(PS_ERR_BAD_PARAMETER_VALUE, true,
-                                "Invalid psRegion specified.  Region contains only 1 pixel.\n");
-                        return -1;
-                    }
-                */
+                            psError(PS_ERR_BAD_PARAMETER_VALUE, true,
+                                    "Invalid psRegion specified.  Region contains only 1 pixel.\n");
+                            return -1;
+                        }
+                    */
     x0 = col0;
     x1 = col1;
@@ -770,6 +770,6 @@
     case PS_TYPE_U8:
     case PS_TYPE_U16:
-        for (long j = y0; j <= y1; j++) {
-            for (long i = x0; i <= x1; i++) {
+        for (long j = y0; j < y1; j++) {
+            for (long i = x0; i < x1; i++) {
                 if (mask->data.PS_TYPE_MASK_DATA[j][i] & value) {
                     Npixels ++;
