[GRASS-SVN] r74446 - grass/trunk/lib/vector/Vlib

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


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

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

Modified: grass/trunk/lib/vector/Vlib/cindex.c
===================================================================
--- grass/trunk/lib/vector/Vlib/cindex.c	2019-05-01 20:10:49 UTC (rev 74445)
+++ grass/trunk/lib/vector/Vlib/cindex.c	2019-05-01 20:46:24 UTC (rev 74446)
@@ -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