Parcourir la source

Fix NaN check in GDAL (r.external) support

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@65602 15284696-431f-4ddb-bdfa-cd5b030d7da7
Glynn Clements il y a 9 ans
Parent
commit
34a179bf33
1 fichiers modifiés avec 2 ajouts et 1 suppressions
  1. 2 1
      lib/raster/get_row.c

+ 2 - 1
lib/raster/get_row.c

@@ -939,7 +939,8 @@ static void get_null_value_row_gdal(int fd, char *flags, int row)
     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);
 }