git.ucc.asn.au
/
ipdf
/
code.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Invalid array indices are not cool
[ipdf/code.git]
/
src
/
quadtree.cpp
diff --git
a/src/quadtree.cpp
b/src/quadtree.cpp
index
3d5dbee
..
b84bb78
100644
(file)
--- a/
src/quadtree.cpp
+++ b/
src/quadtree.cpp
@@
-70,6
+70,12
@@
QuadTreeIndex QuadTree::GetNeighbour(QuadTreeIndex start, int xdir, int ydir, Do
{
if (!xdir && !ydir) return start;
+ if (addTo && (nodes[start].parent == -1) && nodes[start].child_type != QTC_UNKNOWN)
+ {
+ Debug("Adding parent of node %d...", start);
+ addTo->GenQuadParent(start, nodes[start].child_type);
+ }
+
QuadTreeIndex newNode;
// Try moving to the right if that's easy.
if (xdir > 0)
UCC
git Repository :: git.ucc.asn.au