diff options
Diffstat (limited to 'generator')
-rw-r--r-- | generator/ppmforge.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/generator/ppmforge.c b/generator/ppmforge.c index c7cfdb84..7cef571f 100644 --- a/generator/ppmforge.c +++ b/generator/ppmforge.c @@ -34,6 +34,7 @@ #define _XOPEN_SOURCE 500 /* get M_PI in math.h */ #include <math.h> +#include <float.h> #include <assert.h> #include "pm_c_util.h" @@ -169,6 +170,11 @@ parseCommandLine(int argc, const char **argv, if (cmdlineP->dimension <= 0.0) pm_error("-dimension must be greater than zero. " "You specified %f", cmdlineP->dimension); + else if (cmdlineP->dimension > 5.0 + FLT_EPSILON) + pm_error("-dimension must not be greater than 5. " + "Results are not interesting with higher numbers, so " + "we assume it is a mistake. " + "You specified %f", cmdlineP->dimension); } else cmdlineP->dimension = cmdlineP->clouds ? 2.15 : 2.4; |