[GRASS-SVN] r74447 - grass/branches/releasebranch_7_6/lib/vector/Vlib

svn_grass at osgeo.org svn_grass at osgeo.org
Wed May 1 13:46:57 PDT 2019


Author: mmetz
Date: 2019-05-01 13:46:57 -0700 (Wed, 01 May 2019)
New Revision: 74447

Modified:
   grass/branches/releasebranch_7_6/lib/vector/Vlib/cindex.c
Log:
vectorlib: Vect_cidx_find_all() should not allow mixing GV_AREA with other geometries, fixes #3235 (backport trunk r74446)

Modified: grass/branches/releasebranch_7_6/lib/vector/Vlib/cindex.c
===================================================================
--- grass/branches/releasebranch_7_6/lib/vector/Vlib/cindex.c	2019-05-01 20:46:24 UTC (rev 74446)
+++ grass/branches/releasebranch_7_6/lib/vector/Vlib/cindex.c	2019-05-01 20:46:57 UTC (rev 74447)
@@ -54,7 +54,7 @@
     hi = ci->n_cats - 1;
     if (first > hi)
 	return -1;
-    
+
     /* deferred test for equality */
     while (lo < hi) {
 	mid = (lo + hi) >> 1;
@@ -385,6 +385,9 @@
     }
     ci = &(Map->plus.cidx[field_index]);
 
+    if ((type_mask & GV_AREA) && type_mask != GV_AREA)
+	G_fatal_error(_("Mixing IDs of areas and primitives"));
+
     idx = Vect_cidx_find_next(Map, field_index, cat,
 			      type_mask, 0, &type, &line);
 



More information about the grass-commit mailing list