htgop

Optical properties of a gas mixture
git clone git://git.meso-star.fr/htgop.git
Log | Files | Refs | README | LICENSE

commit 5ef0e34476fba5b4ce137351c1eb0305fb8e29d1
parent 03d054f2f1fc87c5e6469731dfa9952f1b4c9817
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Fri,  3 Aug 2018 16:37:55 +0200

Fix issues in the "get_radiative_properties_bounds" functions

Diffstat:
Msrc/htgop_get_radiative_properties_bounds.h | 4++--
Msrc/test_htgop_fetch_radiative_properties.c | 2--
2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/htgop_get_radiative_properties_bounds.h b/src/htgop_get_radiative_properties_bounds.h @@ -49,7 +49,7 @@ CONCAT(CONCAT(CONCAT(CONCAT(htgop_layers_get_,DOMAIN),_),DATA),_bounds) HTGOP(get_layers_count(htgop, &nlayers)); if(ilayer_range[0] > ilayer_range[1] || ilayer_range[0] >= nlayers - || ilayer_range[1] <= nlayers) { + || ilayer_range[1] >= nlayers) { log_err(htgop, "%s: invalid range of layers [%lu, %lu].\n", FUNC_NAME, (unsigned long)ilayer_range[0], (unsigned long)ilayer_range[1]); res = RES_BAD_ARG; @@ -112,7 +112,7 @@ htgop_layer_,DOMAIN),_spectral_interval_quadpoints_get_),DATA),_bounds) size_t iquad; res_T res = RES_OK; - if(!specint || !bounds) { + if(!specint || !bounds || !quad_range) { res = RES_BAD_ARG; goto error; } diff --git a/src/test_htgop_fetch_radiative_properties.c b/src/test_htgop_fetch_radiative_properties.c @@ -14,8 +14,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include "htgop.h" - -#include "htgop.h" #include "test_htgop_utils.h" #include <rsys/math.h>