[geos-commits] r3404 - branches/3.3/src/index/quadtree

svn_geos at osgeo.org svn_geos at osgeo.org
Tue Jul 5 05:43:51 EDT 2011


Author: strk
Date: 2011-07-05 02:43:51 -0700 (Tue, 05 Jul 2011)
New Revision: 3404

Modified:
   branches/3.3/src/index/quadtree/Node.cpp
Log:
Assert that the variable used as array index is not negative before using it (quadtree)


Modified: branches/3.3/src/index/quadtree/Node.cpp
===================================================================
--- branches/3.3/src/index/quadtree/Node.cpp	2011-07-05 09:43:42 UTC (rev 3403)
+++ branches/3.3/src/index/quadtree/Node.cpp	2011-07-05 09:43:51 UTC (rev 3404)
@@ -118,6 +118,7 @@
 	assert( env->contains(node->getEnvelope()) );
 
 	int index = getSubnodeIndex(node->getEnvelope(), centre);
+	assert(index >= 0);
 
 	if (node->level == level-1)
 	{



More information about the geos-commits mailing list