[GRASS-CVS] glynn: grass6/vector/v.what.rast main.c,1.28,1.29

grass at intevation.de grass at intevation.de
Thu Nov 15 21:52:17 EST 2007


Author: glynn

Update of /grassrepository/grass6/vector/v.what.rast
In directory doto:/tmp/cvs-serv20940/vector/v.what.rast

Modified Files:
	main.c 
Log Message:
Fix off-by-one error in duplicate removal code


Index: main.c
===================================================================
RCS file: /grassrepository/grass6/vector/v.what.rast/main.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- main.c	22 Oct 2007 15:23:41 -0000	1.28
+++ main.c	16 Nov 2007 02:52:14 -0000	1.29
@@ -219,7 +219,7 @@
 
     G_debug(1, "Points are sorted, starting duplicate removal loop");
 
-    for (i = j = 0; j < point_cnt; j++)
+    for (i = 0, j = 1; j < point_cnt; j++)
         if (cache[i].cat != cache[j].cat)
 	    cache[++i] = cache[j];
         else




More information about the grass-commit mailing list