Przeglądaj źródła

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 11 lat temu
rodzic
commit
9ac9f974af
1 zmienionych plików z 3 dodań i 3 usunięć
  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;
     static int one_init = 0;
     
     
     if (!one_init) {
     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);
     rect_0 = &(t->rect_0);