Jelajahi Sumber

lib/imagery: Fix file size check (#1274)

Fixes -Wtautological-compare compiler warning.

Co-authored-by: Markus Metz <markus.metz.giswork@gmail.com>
nila 4 tahun lalu
induk
melakukan
c47f2c159a
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      lib/imagery/iscatt_core.c

+ 1 - 1
lib/imagery/iscatt_core.c

@@ -526,7 +526,7 @@ static int compute_scatts_from_chunk_row(struct scCats *scatt_conds,
 			      ("Unable to read from category raster condition file."));
 			      ("Unable to read from category raster condition file."));
 		    return -1;
 		    return -1;
 		}
 		}
-		if (n_pixs != n_pixs) {
+		if (n_pixs != (row_size) / sizeof(unsigned char)) {
 		    G_free(rast_pixs);
 		    G_free(rast_pixs);
 		    G_free(belongs_pix);
 		    G_free(belongs_pix);
 		    G_warning(_
 		    G_warning(_