Ver código fonte

r.what: fix segfault when using -r and outside of region (merge from trunk, https://trac.osgeo.org/grass/changeset/70745)

git-svn-id: https://svn.osgeo.org/grass/grass/branches/releasebranch_7_0@70747 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová 8 anos atrás
pai
commit
db8c53f744
1 arquivos alterados com 2 adições e 2 exclusões
  1. 2 2
      raster/r.what/main.c

+ 2 - 2
raster/r.what/main.c

@@ -414,10 +414,10 @@ int main(int argc, char *argv[])
 		}
 		if (flg.color->answer) {
 		    if (out_type[i] == CELL_TYPE)
-			Rast_get_c_color(&cell[i][cache[point].col],
+			Rast_get_c_color(&(cache[point].value[i]),
 					     &red, &green, &blue, &ncolor[i]);
 		    else
-			Rast_get_d_color(&dcell[i][cache[point].col],
+			Rast_get_d_color(&(cache[point].dvalue[i]),
 					     &red, &green, &blue, &ncolor[i]);
 
 		    sprintf(cache[point].clr_buf[i], "%03d:%03d:%03d", red,