[GRASS-SVN] r70498 - grass/branches/releasebranch_7_0/raster/r.volume

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


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

Modified:
   grass/branches/releasebranch_7_0/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_0/raster/r.volume/centroids.c
===================================================================
--- grass/branches/releasebranch_7_0/raster/r.volume/centroids.c	2017-02-07 19:49:22 UTC (rev 70497)
+++ grass/branches/releasebranch_7_0/raster/r.volume/centroids.c	2017-02-07 19:49:48 UTC (rev 70498)
@@ -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