[GRASS-SVN] r70491 - grass/trunk/raster/r.volume

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Feb 6 16:29:21 PST 2017


Author: wenzeslaus
Date: 2017-02-06 16:29:21 -0800 (Mon, 06 Feb 2017)
New Revision: 70491

Modified:
   grass/trunk/raster/r.volume/centroids.c
Log:
r.volume: the first item in the array is unused, so don't read from it

Modified: grass/trunk/raster/r.volume/centroids.c
===================================================================
--- grass/trunk/raster/r.volume/centroids.c	2017-02-06 20:15:10 UTC (rev 70490)
+++ grass/trunk/raster/r.volume/centroids.c	2017-02-07 00:29:21 UTC (rev 70491)
@@ -64,7 +64,7 @@
 
     /* compute averages */
     if (method > 0)
-	for (i = 0; i <= max; i++) {
+	for (i = 1; i <= max; i++) {
 	    if (count[i]) {
 		numb = count[i];
 		e[i] /= numb;



More information about the grass-commit mailing list