[GRASS-SVN] r70497 - grass/branches/releasebranch_7_2/raster/r.volume

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Feb 7 11:49:22 PST 2017


Author: wenzeslaus
Date: 2017-02-07 11:49:22 -0800 (Tue, 07 Feb 2017)
New Revision: 70497

Modified:
   grass/branches/releasebranch_7_2/raster/r.volume/centroids.c
Log:
r.volume: the first item in the array is unused, so don't read from it (backport r70491)

Modified: grass/branches/releasebranch_7_2/raster/r.volume/centroids.c
===================================================================
--- grass/branches/releasebranch_7_2/raster/r.volume/centroids.c	2017-02-07 10:03:42 UTC (rev 70496)
+++ grass/branches/releasebranch_7_2/raster/r.volume/centroids.c	2017-02-07 19:49:22 UTC (rev 70497)
@@ -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