[GRASS-SVN] r65602 - grass/trunk/lib/raster

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Jul 18 03:47:34 PDT 2015


Author: glynn
Date: 2015-07-18 03:47:34 -0700 (Sat, 18 Jul 2015)
New Revision: 65602

Modified:
   grass/trunk/lib/raster/get_row.c
Log:
Fix NaN check in GDAL (r.external) support


Modified: grass/trunk/lib/raster/get_row.c
===================================================================
--- grass/trunk/lib/raster/get_row.c	2015-07-17 08:01:59 UTC (rev 65601)
+++ grass/trunk/lib/raster/get_row.c	2015-07-18 10:47:34 UTC (rev 65602)
@@ -939,7 +939,8 @@
     for (i = 0; i < R__.rd_window.cols; i++)
 	/* note: using == won't work if the null value is NaN */
 	flags[i] = !fcb->col_map[i] ||
-	    memcmp(&tmp_buf[i], &fcb->gdal->null_val, sizeof(DCELL)) == 0;
+	    tmp_buf[i] == fcb->gdal->null_val ||
+	    tmp_buf[i] != tmp_buf[i];
 
     G_free(tmp_buf);
 }



More information about the grass-commit mailing list