[GRASS-SVN] r73138 - grass/trunk/raster/r.kappa

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Aug 22 12:43:48 PDT 2018


Author: mmetz
Date: 2018-08-22 12:43:48 -0700 (Wed, 22 Aug 2018)
New Revision: 73138

Modified:
   grass/trunk/raster/r.kappa/prt_mat.c
Log:
r.kappa: fix qsort cmp fn (see #3564)

Modified: grass/trunk/raster/r.kappa/prt_mat.c
===================================================================
--- grass/trunk/raster/r.kappa/prt_mat.c	2018-08-22 19:41:05 UTC (rev 73137)
+++ grass/trunk/raster/r.kappa/prt_mat.c	2018-08-22 19:43:48 UTC (rev 73138)
@@ -206,8 +206,8 @@
     const long *a = aa;
     const long *b = bb;
 
-    if (*a != *b)
-	return (*a > *b ? 1 : -1);
+    if (*a < *b)
+	return -1;
 
-    return 0;
+    return (*a > *b);
 }



More information about the grass-commit mailing list