mirror of
https://bitbucket.org/cosmicvoids/vide_public.git
synced 2025-07-04 23:31:12 +00:00
Check that no overflow occurs
This commit is contained in:
parent
5f9e5eb5d8
commit
6c9644c8de
1 changed files with 2 additions and 0 deletions
|
@ -186,9 +186,11 @@ public:
|
||||||
nodes[p].children.push_back(&nodes[i]);
|
nodes[p].children.push_back(&nodes[i]);
|
||||||
nodes[i].parent = &nodes[p];
|
nodes[i].parent = &nodes[p];
|
||||||
}
|
}
|
||||||
|
|
||||||
inserted++;
|
inserted++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
assert(inserted < totalNumNodes);
|
||||||
rootNode = &nodes[inserted+1];
|
rootNode = &nodes[inserted+1];
|
||||||
rootNode->vid = -1;
|
rootNode->vid = -1;
|
||||||
rootNode->parent = 0;
|
rootNode->parent = 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue