Skip to content

bug in AABBTree.cpp  #1

@jksr

Description

@jksr

the implementation of insertLeaf has bug:

in line 132
AABBNode& leafNode = _nodes[leafNodeIndex];

but in line 192
unsigned newParentIndex = allocateNode();

if AABBNode pool gets resized in ln192, the reference in ln132 will cause problem.

It's better to change all this kind of "AABBnode&"s to "_nodes[index]" to avoid this kind of pitfall.

Anyway, thank you very much for the AABBTree code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions