From 21e0aed46bdc905df098efe6bb7fca464b7d7fa6 Mon Sep 17 00:00:00 2001
From: Daniel Waggoner <dwaggoner@frbatlanta.org>
Date: Wed, 6 Jul 2011 16:03:24 -0400
Subject: [PATCH] corrected conditional statement in vector sort routines
 (cherry picked from commit 5e6d54bc18ce061b84ce7d23812b0c2430f50b07)

---
 sort/dw_matrix_sort.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sort/dw_matrix_sort.c b/sort/dw_matrix_sort.c
index e187d4f..5372444 100644
--- a/sort/dw_matrix_sort.c
+++ b/sort/dw_matrix_sort.c
@@ -184,7 +184,7 @@ TVector SortVectorAscending(TVector x, TVector y)
       dw_Error(NULL_ERR);
       return (TVector)NULL;
     }
-  if ((x != x) && !(x=EquateVector(x,y)))
+  if ((x != y) && !(x=EquateVector(x,y)))
     return (TVector)NULL;
   b_qsort_array_ascending_real(pElementV(x),DimV(x));
   return x;
@@ -213,7 +213,7 @@ TVector SortVectorDescending(TVector x, TVector y)
       dw_Error(NULL_ERR);
       return (TVector)NULL;
     }
-  if ((x != x) && !(x=EquateVector(x,y)))
+  if ((x != y) && !(x=EquateVector(x,y)))
     return (TVector)NULL;
   b_qsort_array_descending_real(pElementV(x),DimV(x));
   return x;
-- 
GitLab