Browse Source

fix array index

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@46920 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Metz 14 years ago
parent
commit
e23b2525e6
1 changed files with 2 additions and 2 deletions
  1. 2 2
      lib/vector/diglib/spindex.c

+ 2 - 2
lib/vector/diglib/spindex.c

@@ -447,7 +447,7 @@ int dig_spidx_del_area(struct Plus_head *Plus, int area)
 	G_fatal_error(_("Attempt to delete sidx for dead area"));
     }
 
-    Line = Plus->Line[Area->lines[0]];
+    Line = Plus->Line[abs(Area->lines[0])];
     topo = (struct P_topo_b *)Line->topo;
     Node = Plus->Node[topo->N1];
 
@@ -489,7 +489,7 @@ int dig_spidx_del_isle(struct Plus_head *Plus, int isle)
 
     Isle = Plus->Isle[isle];
 
-    Line = Plus->Line[Isle->lines[0]];
+    Line = Plus->Line[abs(Isle->lines[0])];
     topo = (struct P_topo_b *)Line->topo;
     Node = Plus->Node[topo->N1];