Explorar o código

Allocate the maximum number of dimensions to avoid unexpected behavior when switching dimensions in a process.

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@57596 15284696-431f-4ddb-bdfa-cd5b030d7da7
Soeren Gebbert %!s(int64=11) %!d(string=hai) anos
pai
achega
9ac9f974af
Modificáronse 1 ficheiros con 3 adicións e 3 borrados
  1. 3 3
      lib/vector/rtree/split.c

+ 3 - 3
lib/vector/rtree/split.c

@@ -455,9 +455,9 @@ static void RTreeMethodOne(struct RTree_PartitionVars *p, int minfill,
     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);