[GRASS-SVN] r65603 - grass/branches/releasebranch_7_0/lib/raster

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Jul 18 04:41:18 PDT 2015


Author: martinl
Date: 2015-07-18 04:41:18 -0700 (Sat, 18 Jul 2015)
New Revision: 65603

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


Modified: grass/branches/releasebranch_7_0/lib/raster/get_row.c
===================================================================
--- grass/branches/releasebranch_7_0/lib/raster/get_row.c	2015-07-18 10:47:34 UTC (rev 65602)
+++ grass/branches/releasebranch_7_0/lib/raster/get_row.c	2015-07-18 11:41:18 UTC (rev 65603)
@@ -902,7 +902,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