浏览代码

r.volume: the first item in the array is unused, so don't read from it (backport https://trac.osgeo.org/grass/changeset/70491)

git-svn-id: https://svn.osgeo.org/grass/grass/branches/releasebranch_7_0@70498 15284696-431f-4ddb-bdfa-cd5b030d7da7
Vaclav Petras 8 年之前
父节点
当前提交
7d2bd2e2b9
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      raster/r.volume/centroids.c

+ 1 - 1
raster/r.volume/centroids.c

@@ -64,7 +64,7 @@ int centroids(int fd,		/* File descriptor of map layer to process */
 
     /* 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;