htrdr

Solving radiative transfer in heterogeneous media
git clone git://git.meso-star.fr/htrdr.git
Log | Files | Refs | README | LICENSE

commit 85a43902649adb335bbba83843d49ff4248cacd5
parent 1f2a7abf1153f7dbb8fc0747f4cd3e2922b72ddd
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Mon, 12 Dec 2022 10:10:00 +0100

planeto: fix the htrdr_planeto_source_get_spectrum function

The returned buffer could point to invalid data regarding the input
spectral range.

Diffstat:
Msrc/planeto/htrdr_planeto_source.c | 4++++
1 file changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/planeto/htrdr_planeto_source.c b/src/planeto/htrdr_planeto_source.c @@ -439,7 +439,11 @@ htrdr_planeto_source_get_spectrum /* The lower limit coincide with a discrete element. * Remove the discrete element */ source_spectrum->size -= 1; + source_spectrum->buffer = low + 1; + } else { + source_spectrum->buffer = low; } + } }