[GRASS-SVN] r57596 - grass/trunk/lib/vector/rtree
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Sep 5 06:47:27 PDT 2013
Author: huhabla
Date: 2013-09-05 06:47:27 -0700 (Thu, 05 Sep 2013)
New Revision: 57596
Modified:
grass/trunk/lib/vector/rtree/split.c
Log:
Allocate the maximum number of dimensions to avoid unexpected behavior when switching dimensions in a process.
Modified: grass/trunk/lib/vector/rtree/split.c
===================================================================
--- grass/trunk/lib/vector/rtree/split.c 2013-09-05 13:45:32 UTC (rev 57595)
+++ grass/trunk/lib/vector/rtree/split.c 2013-09-05 13:47:27 UTC (rev 57596)
@@ -455,9 +455,9 @@
static int one_init = 0;
if (!one_init) {
- best_cut = (int *)malloc(t->ndims_alloc * sizeof(int));
- best_side = (int *)malloc(t->ndims_alloc * sizeof(int));
- one_init = 1;
+ best_cut = (int *)malloc(MAXLEVEL * sizeof(int));
+ best_side = (int *)malloc(MAXLEVEL * sizeof(int));
+ one_init = 1;
}
rect_0 = &(t->rect_0);
More information about the grass-commit
mailing list