solstice-solver

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

commit cdbde943c387bd229f30670a653a6c8f8c80ac33
parent 7c65c07278b2c979c35f692d21b91895b54bcb89
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Tue, 29 Nov 2016 10:13:56 +0100

Fix the pre-condition test of ssol_sun_get_dni

Diffstat:
Msrc/ssol_sun.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/ssol_sun.c b/src/ssol_sun.c @@ -149,7 +149,7 @@ ssol_sun_set_dni(struct ssol_sun* sun, const double dni) res_T ssol_sun_get_dni(const struct ssol_sun* sun, double* dni) { - if (!sun || dni <= 0) + if (!sun || !dni) return RES_BAD_ARG; *dni = sun->dni; return RES_OK;