solstice

Compute collected power and efficiencies of a solar plant
git clone git://git.meso-star.com/solstice.git
Log | Files | Refs | README | LICENSE

commit 98de196c85db9e375be5c8c3723073633449647a
parent 91c4ecd40ca36394bf66e348712e4a42e236a445
Author: Christophe Coustet <christophe.coustet@meso-star.com>
Date:   Fri, 13 Jan 2017 15:05:41 +0100

Exclude sphere with radius 0

+ fix a log message

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

diff --git a/src/parser/solparser.c b/src/parser/solparser.c @@ -1210,7 +1210,7 @@ parse_polyclip #define CHECK_PARAM(Flag, Name) \ if(!(mask & BIT(Flag))) { \ log_err(parser, polyclip, \ - "the clipping polygon parameter `"Name"' is missing"); \ + "the clipping polygon parameter `"Name"' is missing.\n"); \ res = RES_BAD_ARG; \ goto error; \ } (void)0 @@ -1747,7 +1747,7 @@ parse_sphere } (void)0 if(!strcmp((char*)key->data.scalar.value, "radius")) { SETUP_MASK(RADIUS, "radius"); - res = parse_real(parser, val, 0, DBL_MAX, &shape->radius); + res = parse_real(parser, val, nextafter(0, 1), DBL_MAX, &shape->radius); } else if(!strcmp((char*)key->data.scalar.value, "slices")) { SETUP_MASK(SLICES, "slices"); res = parse_integer(parser, val, 4, 4096, &shape->nslices);