Преглед на файлове

Fix bug in calc_mu (reported by Peng Du); as for https://trac.osgeo.org/grass/changeset/39800 in 6.x


git-svn-id: https://svn.osgeo.org/grass/grass/trunk@39801 15284696-431f-4ddb-bdfa-cd5b030d7da7
Glynn Clements преди 15 години
родител
ревизия
4fa9c04019
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 2 2
      imagery/i.pca/main.c

+ 2 - 2
imagery/i.pca/main.c

@@ -256,12 +256,12 @@ static int calc_mu(int *fds, double *mu, int bands)
 
 	    for (col = 0; col < cols; col++) {
 		/* skip null cells */
-		if (Rast_is_null_value(rowbuf, maptype)) {
+		if (Rast_is_null_value(ptr, maptype)) {
 		    ptr = G_incr_void_ptr(ptr, Rast_cell_size(maptype));
 		    continue;
 		}
 
-		sum += Rast_get_d_value(rowbuf, maptype);
+		sum += Rast_get_d_value(ptr, maptype);
 		ptr = G_incr_void_ptr(ptr, Rast_cell_size(maptype));
 	    }
 	}