summaryrefslogtreecommitdiff
path: root/lib/sbin/parameter_parser.pl
diff options
context:
space:
mode:
authortradke <tradke@17b73243-c579-4c4c-a9d2-2d5706c11dac>2005-05-16 15:03:53 +0000
committertradke <tradke@17b73243-c579-4c4c-a9d2-2d5706c11dac>2005-05-16 15:03:53 +0000
commita5ccbba697c7d9f5eb4d64804ba674888951af8f (patch)
tree84c316a41f4de06ee58ce071515fa38acb59e12a /lib/sbin/parameter_parser.pl
parentfef61b76eb267beb01fdfa20fc061b5f6e857c1b (diff)
Fixed bug from my previous commit which used the wrong logical expression
for checking the default value of numerical parameters. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4056 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib/sbin/parameter_parser.pl')
-rw-r--r--lib/sbin/parameter_parser.pl8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/sbin/parameter_parser.pl b/lib/sbin/parameter_parser.pl
index 065becff..76ef9239 100644
--- a/lib/sbin/parameter_parser.pl
+++ b/lib/sbin/parameter_parser.pl
@@ -617,8 +617,8 @@ sub CheckParameterDefault
$range =~ /^([\s\*0-9]*):([\s\*0-9]*)/;
$min = $1;
$max = $2;
- $foundit = 1 if ($min =~ /^\s*[\*\s]*\s*$/ && $default >= $min &&
- $max =~ /^\s*[\*\s]*\s*$/ && $default <= $max);
+ $foundit = 1 if (($min =~ /^\s*[\*\s]*\s*$/ || $default >= $min) &&
+ ($max =~ /^\s*[\*\s]*\s*$/ || $default <= $max));
}
if ($nranges > 0 && $foundit == 0)
{
@@ -638,8 +638,8 @@ sub CheckParameterDefault
$range =~ /^([\s\*0-9\.eE+-]*):([\s\*0-9\.eE+-]*)/;
$min = $1;
$max = $2;
- $foundit = 1 if ($min =~ /^\s*[\*\s]*\s*$/ && $default >= $min &&
- $max =~ /^\s*[\*\s]*\s*$/ && $default <= $max);
+ $foundit = 1 if (($min =~ /^\s*[\*\s]*\s*$/ || $default >= $min) &&
+ ($max =~ /^\s*[\*\s]*\s*$/ || $default <= $max));
}
if ($nranges > 0 && $foundit == 0)
{