solstice-solver

Solver library of the solstice app
git clone git://git.meso-star.com/solstice-solver.git
Log | Files | Refs | README | LICENSE

commit 59d25a3993bfb38026ba36da12efb88e098137b3
parent f9643c804ce1724c3bf87ce4962123bfe7480443
Author: Christophe Coustet <christophe.coustet@meso-star.com>
Date:   Wed, 20 Sep 2017 19:17:17 +0200

BugFix: wavelength (potentially) used uninitialized.

Diffstat:
Msrc/ssol_solver.c | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/ssol_solver.c b/src/ssol_solver.c @@ -272,6 +272,9 @@ point_init /* Sample a sun direction */ ranst_sun_dir_get(ran_sun_dir, rng, pt->dir); + + /* Sample a wavelength */ + pt->wl = ranst_sun_wl_get(ran_sun_wl, rng); if(pt->sshape->shape->type != SHAPE_PUNCHED) { d3_set(N, pt->N); @@ -356,9 +359,6 @@ point_init f3_set_d3(pos, pt->pos); S3D(scene_view_trace_ray(view_rt, pos, dir, range, &ray_data, &hit)); *is_lit = S3D_HIT_NONE(&hit); - if(*is_lit) { - pt->wl = ranst_sun_wl_get(ran_sun_wl, rng); /* Sample a wavelength */ - } exit: return res;