[GRASS-SVN] r40573 - grass/branches/develbranch_6/raster/r.in.bin

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Jan 20 08:23:02 EST 2010


Author: neteler
Date: 2010-01-20 08:23:01 -0500 (Wed, 20 Jan 2010)
New Revision: 40573

Modified:
   grass/branches/develbranch_6/raster/r.in.bin/main.c
Log:
Fix segfault with -d and anull=... (backport from trunk, r40554)

Modified: grass/branches/develbranch_6/raster/r.in.bin/main.c
===================================================================
--- grass/branches/develbranch_6/raster/r.in.bin/main.c	2010-01-20 13:22:35 UTC (rev 40572)
+++ grass/branches/develbranch_6/raster/r.in.bin/main.c	2010-01-20 13:23:01 UTC (rev 40573)
@@ -558,7 +558,11 @@
 		    cell[col] = (CELL) (unsigned int)x_i[col];
 	    }
 	    if (parm.anull->answer) {
-		if (flag.f->answer) {
+		if (flag.d->answer) {
+		    if (dcell[col] == nul_val)
+			G_set_d_null_value(&dcell[col], 1);
+		}
+		else if (flag.f->answer) {
 		    if (fcell[col] == (float)nul_val)
 			G_set_f_null_value(&fcell[col], 1);
 		}



More information about the grass-commit mailing list