From d381ed351c08c9fc916c219c52831aa6ba958b7c Mon Sep 17 00:00:00 2001 From: tradke Date: Mon, 15 Sep 2008 16:18:00 +0000 Subject: bugfix in {integer,real} parameter range checking routines for the case where there's only '*' given as allowed value (see also thread http://www.cactuscode.org/old/pipermail/developers/2008-September/005626.html) git-svn-id: http://svn.cactuscode.org/flesh/trunk@4504 17b73243-c579-4c4c-a9d2-2d5706c11dac --- src/util/Misc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/util') diff --git a/src/util/Misc.c b/src/util/Misc.c index 37c7ba2f..96b9dd0b 100644 --- a/src/util/Misc.c +++ b/src/util/Misc.c @@ -467,8 +467,8 @@ int Util_IntInRange(int inval, const char *range) } else { - /* End range not given, so interval has length zero. */ - end = start; + /* End range not given, so interval has either zero or infinite length. */ + end = start == INT_MIN ? INT_MAX : start; } /* Next find whether step of the range is present */ @@ -669,8 +669,8 @@ int Util_DoubleInRange(double inval, const char *range) } else { - /* End range not given, so interval has length zero. */ - end = start; + /* End range not given, so interval has either zero or infinite length. */ + end = start == -HUGE_VAL ? HUGE_VAL : start; } /* Next find whether step of the range is present */ -- cgit v1.2.3