htrdr

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

commit 52a098d5d86ffd5c9fa6864ff30979f2c205d152
parent 1d182b5d7eb7d6d908b4bf638271c7c3f6184c59
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Wed,  3 Jun 2020 14:26:28 +0200

Fix the parsing of the -s option

Diffstat:
Msrc/htrdr_args.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/htrdr_args.c b/src/htrdr_args.c @@ -303,7 +303,7 @@ parse_spectral_parameter(struct htrdr_args* args, const char* str) strncpy(buf, str, sizeof(buf)); key = strtok_r(buf, "=", &ctx); - val = strtok_r(buf, "", &ctx); + val = strtok_r(NULL, "", &ctx); if(!strcmp(key, "cie_xyz")) { args->spectral_type = HTRDR_SPECTRAL_SW_CIE_XYZ; @@ -319,7 +319,7 @@ parse_spectral_parameter(struct htrdr_args* args, const char* str) args->spectral_type = HTRDR_SPECTRAL_SW; res = parse_spectral_range(val, args->wlen_range); if(res != RES_OK) goto error; - } else if(!strcmp(val, "lw")) { + } else if(!strcmp(key, "lw")) { args->spectral_type = HTRDR_SPECTRAL_LW; res = parse_spectral_range(val, args->wlen_range); if(res != RES_OK) goto error;