[GRASS-SVN] r50302 - grass/trunk/lib/vector/vedit

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Jan 19 11:22:25 EST 2012


Author: martinl
Date: 2012-01-19 08:22:25 -0800 (Thu, 19 Jan 2012)
New Revision: 50302

Modified:
   grass/trunk/lib/vector/vedit/delete.c
Log:
vedit: fix Vedit_delete_area() - negative boundary ids


Modified: grass/trunk/lib/vector/vedit/delete.c
===================================================================
--- grass/trunk/lib/vector/vedit/delete.c	2012-01-19 15:17:05 UTC (rev 50301)
+++ grass/trunk/lib/vector/vedit/delete.c	2012-01-19 16:22:25 UTC (rev 50302)
@@ -89,7 +89,7 @@
 */
 int Vedit_delete_area(struct Map_info *Map, int area)
 {
-    int i, centroid, left, right;
+    int i, line, centroid, left, right;
     struct ilist *list;
 
     list   = Vect_new_list();
@@ -106,12 +106,13 @@
     Vect_get_area_boundaries(Map, area, list);
     if (list->n_values > 0) {
 	for (i = 0; i < list->n_values; i++) {
-	    Vect_get_line_areas(Map, abs(list->value[i]), &left, &right);
+	    line = abs(list->value[i]);
+	    Vect_get_line_areas(Map, line, &left, &right);
 	    if (left > 0 && right > 0)
 		/* do not delete common boundaries */
 		continue;
 	    
-	    Vect_delete_line(Map, list->value[i]);
+	    Vect_delete_line(Map, line);
 	}
     }
     else {



More information about the grass-commit mailing list