diff --git a/src/gen/gendaymtx.c b/src/gen/gendaymtx.c index 08f05d255..507072068 100644 --- a/src/gen/gendaymtx.c +++ b/src/gen/gendaymtx.c @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: gendaymtx.c,v 2.20 2015/08/01 23:27:04 greg Exp $"; +static const char RCSid[] = "$Id: gendaymtx.c,v 2.21 2015/09/02 22:52:04 greg Exp $"; #endif /* * gendaymtx.c @@ -395,6 +395,11 @@ main(int argc, char *argv[]) case '5': /* 5-phase calculation */ nsuns = 1; fixed_sun_sa = PI/360.*atof(argv[++i]); + if (fixed_sun_sa <= 0) { + fprintf(stderr, "%s: missing solar disk size argument for '-5' option\n", + argv[0]); + exit(1); + } fixed_sun_sa *= fixed_sun_sa*PI; break; default: