[GRASS-SVN] r70747 - grass/branches/releasebranch_7_0/raster/r.what

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Mar 11 17:40:38 PST 2017


Author: annakrat
Date: 2017-03-11 17:40:38 -0800 (Sat, 11 Mar 2017)
New Revision: 70747

Modified:
   grass/branches/releasebranch_7_0/raster/r.what/main.c
Log:
r.what: fix segfault when using -r and outside of region (merge from trunk, r70745)

Modified: grass/branches/releasebranch_7_0/raster/r.what/main.c
===================================================================
--- grass/branches/releasebranch_7_0/raster/r.what/main.c	2017-03-12 01:39:21 UTC (rev 70746)
+++ grass/branches/releasebranch_7_0/raster/r.what/main.c	2017-03-12 01:40:38 UTC (rev 70747)
@@ -414,10 +414,10 @@
 		}
 		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,



More information about the grass-commit mailing list