Skip to content
Snippets Groups Projects
Commit 29ddcdc9 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

Check parent index.

parent 7dad01da
No related branches found
No related tags found
No related merge requests found
......@@ -171,6 +171,13 @@ void compute_child(cellindex_type *cellindex1, cellindex_type *cellindex2)
{
int ncells1 = cellindex1->ncells;
int *parent1 = cellindex1->parent;
for ( int i = 1; i < ncells1; ++i )
if ( parent1[i] < parent1[i-1] )
{
cdoWarning("Parent index not sorted in %s!", cellindex1->filename);
break;
}
int ncells2 = cellindex2->ncells;
int *child2 = (int*) Malloc(4*ncells2*sizeof(int));
cellindex2->child = child2;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment