summaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authortradke <tradke@17b73243-c579-4c4c-a9d2-2d5706c11dac>2008-09-15 16:18:00 +0000
committertradke <tradke@17b73243-c579-4c4c-a9d2-2d5706c11dac>2008-09-15 16:18:00 +0000
commitd381ed351c08c9fc916c219c52831aa6ba958b7c (patch)
treeb9c185cc56eaaf751eb455b03194f5ce53f09efc /src/util
parent9576c556be269e473b5f67ac9b94052bd3c8c70e (diff)
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
Diffstat (limited to 'src/util')
-rw-r--r--src/util/Misc.c8
1 files changed, 4 insertions, 4 deletions
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 */