Index: /trunk/psLib/src/types/psArray.c
===================================================================
--- /trunk/psLib/src/types/psArray.c	(revision 15114)
+++ /trunk/psLib/src/types/psArray.c	(revision 15115)
@@ -9,6 +9,6 @@
  *  @author Ross Harman, MHPCC
  *
- *  @version $Revision: 1.63 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2007-09-28 21:03:24 $
+ *  @version $Revision: 1.64 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2007-09-29 22:18:09 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -282,7 +282,9 @@
         long j = (I << 1) + 1;
         while (j <= J) {
-	    result = func (in->data[index[j]], in->data[index[j+1]]);
-            if ((j < J) && (result < 0)) {
-                j++;
+	    if (j < J) {
+		result = func (in->data[index[j]], in->data[index[j+1]]);
+		if (result < 0) {
+		    j++;
+		}
 	    }
 	    result = func (in->data[temp], in->data[index[j]]);
