Browse Source

r.in.poly: fix writing cell value 0

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@62818 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová 10 years ago
parent
commit
9f5d2ff2c8
1 changed files with 3 additions and 0 deletions
  1. 3 0
      raster/r.in.poly/getformat.c

+ 3 - 0
raster/r.in.poly/getformat.c

@@ -30,6 +30,9 @@ int getformat(FILE * fd, int raster_type, int *null)
 	if (sscanf(buf + 1, "%ld", &x) != 1)
 	    continue;
 	cat = (CELL) x;
+	/* if we want to write zeros, we must use CELL */
+	if (cat == 0)
+	    return USE_CELL;
 	if (first) {
 	    first = 0;
 	    max = cat;