[GRASS-SVN] r40554 - grass/trunk/raster/r.in.bin

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Jan 19 10:41:38 EST 2010


Author: glynn
Date: 2010-01-19 10:41:38 -0500 (Tue, 19 Jan 2010)
New Revision: 40554

Modified:
   grass/trunk/raster/r.in.bin/main.c
Log:
Fix segfault with -d and anull=...


Modified: grass/trunk/raster/r.in.bin/main.c
===================================================================
--- grass/trunk/raster/r.in.bin/main.c	2010-01-19 11:46:59 UTC (rev 40553)
+++ grass/trunk/raster/r.in.bin/main.c	2010-01-19 15:41:38 UTC (rev 40554)
@@ -555,7 +555,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)
+			Rast_set_d_null_value(&dcell[col], 1);
+		}
+		else if (flag.f->answer) {
 		    if (fcell[col] == (float)nul_val)
 			Rast_set_f_null_value(&fcell[col], 1);
 		}



More information about the grass-commit mailing list