summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2011-02-10 02:08:52 -0500
committerTavian Barnes <tavianator@gmail.com>2011-02-10 02:08:52 -0500
commitcf8fba7aab4b7bf52a4b0a0cd170956e0402a667 (patch)
treef6eb9237aa613da69a1b3ef8b47368e0baa0896f
parent7a8e96bfda0d05d7a1c8547e221e5b2005bc8250 (diff)
downloaddimension-cf8fba7aab4b7bf52a4b0a0cd170956e0402a667.tar.xz
Don't use uninitialized values in PR-tree test/benchmark.
-rw-r--r--bench/libdimension/prtree.c1
-rw-r--r--tests/libdimension/prtree.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/bench/libdimension/prtree.c b/bench/libdimension/prtree.c
index 6b0bfdf..c04dd46 100644
--- a/bench/libdimension/prtree.c
+++ b/bench/libdimension/prtree.c
@@ -26,6 +26,7 @@ dmnsn_fake_intersection_fn(const dmnsn_object *object, dmnsn_line line,
dmnsn_intersection *intersection)
{
intersection->t = (object->bounding_box.min.z - line.x0.z)/line.n.z;
+ intersection->normal = dmnsn_x;
return true;
}
diff --git a/tests/libdimension/prtree.c b/tests/libdimension/prtree.c
index cf9d4fb..d6f7672 100644
--- a/tests/libdimension/prtree.c
+++ b/tests/libdimension/prtree.c
@@ -33,6 +33,7 @@ dmnsn_fake_intersection_fn(const dmnsn_object *object, dmnsn_line line,
dmnsn_intersection *intersection)
{
intersection->t = (object->bounding_box.min.z - line.x0.z)/line.n.z;
+ intersection->normal = dmnsn_x;
++calls;
return true;
}