From a5ccbba697c7d9f5eb4d64804ba674888951af8f Mon Sep 17 00:00:00 2001 From: tradke Date: Mon, 16 May 2005 15:03:53 +0000 Subject: 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 --- lib/sbin/parameter_parser.pl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/sbin/parameter_parser.pl') 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) { -- cgit v1.2.3