diff options
author | Vito Caputo <vcaputo@pengaru.com> | 2018-05-17 21:26:47 -0700 |
---|---|---|
committer | Vito Caputo <vcaputo@pengaru.com> | 2018-05-17 21:26:47 -0700 |
commit | 6bb650c8062b76770624073f779dcf433028fddd (patch) | |
tree | d0859c354bb001fa13e992c592bb34eaa0092037 | |
parent | eab950c0678b44912daad5e716d0f0762c7a0894 (diff) |
libix2: fix bug in OOB insert
Was returning the user-supplied object pointer as the ix2_object_t,
oops.
-rw-r--r-- | src/ix2.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -426,7 +426,7 @@ ix2_object_t * ix2_insert_object(ix2_t *ix2, aabb_t *object_aabb, void *object) o->aabb_len_sq = aabb_len_sq(object_aabb); if (!aabb_overlap(&ix2->aabb, object_aabb)) - return object; + return o; return add_object(ix2, &depth, &ix2->root, &ix2->aabb, o, NULL); } |