[GRASS5] [bug #1436] (grass) r.mapcalc seems to treat [0,1] like [0,2]

Glynn Clements glynn.clements at virgin.net
Sun Nov 24 07:14:13 EST 2002


Request Tracker wrote:

> Subject: r.mapcalc seems to treat [0,1] like [0,2]

Oops. Due to a missing break statement, the code shifts integer maps
twice, so the column offset is effectively doubled.

You can fix this manually, by adding a break statement at line 225 in
src/raster/r.mapcalc3/map.c (see the other two clauses for
comparison), or by applying the attached patch.

-- 
Glynn Clements <glynn.clements at virgin.net>

-------------- next part --------------
--- src/raster/r.mapcalc3/map.c~	Thu Oct 10 20:12:24 2002
+++ src/raster/r.mapcalc3/map.c	Sun Nov 24 12:10:58 2002
@@ -222,6 +222,7 @@
 			}
 			for ( ; i < columns; i++)
 				SET_NULL_C(&ibuf[i]);
+			break;
 
 		case FCELL_TYPE:
 			for (i = 0; i < columns - col; i++)


More information about the grass-dev mailing list