diff options
author | Brecht Van Lommel <brecht@blender.org> | 2021-09-29 17:14:38 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2021-09-29 17:37:32 +0300 |
commit | 367775ac6a2d1a4d002952aa2731778f99d13d6a (patch) | |
tree | 3094eaa359dc2d87cb51a83d379d02305a10b219 /intern/cycles/bvh/bvh_embree.cpp | |
parent | 4d4113adc2623c50888b63eaca3a055d8cdf3045 (diff) |
Fix Cycles use of uninitialized value in volume stack intersection on CPU
Could cause an actual bug but probability is low in practice.
Diffstat (limited to 'intern/cycles/bvh/bvh_embree.cpp')
-rw-r--r-- | intern/cycles/bvh/bvh_embree.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/intern/cycles/bvh/bvh_embree.cpp b/intern/cycles/bvh/bvh_embree.cpp index 96852510b63..20430cb164c 100644 --- a/intern/cycles/bvh/bvh_embree.cpp +++ b/intern/cycles/bvh/bvh_embree.cpp @@ -213,7 +213,7 @@ static void rtc_filter_occluded_func(const RTCFilterFunctionNArguments *args) if (ctx->num_hits < ctx->max_hits) { Intersection current_isect; kernel_embree_convert_hit(kg, ray, hit, ¤t_isect); - for (size_t i = 0; i < ctx->max_hits; ++i) { + for (size_t i = 0; i < ctx->num_hits; ++i) { if (current_isect.object == ctx->isect_s[i].object && current_isect.prim == ctx->isect_s[i].prim && current_isect.t == ctx->isect_s[i].t) { /* This intersection was already recorded, skip it. */ |