X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=cgi-bin%2Fctsim.cgi.in;h=3ec39ca7e18965a5666025e936a64839246018dc;hb=182997ba0074a9e2d0f1c9780ed3baef938f7aaa;hp=60b4bb0b160a1e1034bf6f6b280614b5d875825a;hpb=0672fef661f75b412c2fd59c22ea7b24fdef6526;p=ctsim.git
diff --git a/cgi-bin/ctsim.cgi.in b/cgi-bin/ctsim.cgi.in
index 60b4bb0..3ec39ca 100755
--- a/cgi-bin/ctsim.cgi.in
+++ b/cgi-bin/ctsim.cgi.in
@@ -56,11 +56,11 @@ my $Disp_Min = "auto";
my $Disp_Max = "auto";
$Disp_Min = FilterToNumber($in{'Disp_Min'}) if ($in{'Disp_Min'} ne "auto" && $in{'Disp_Min'} ne "");
$Disp_Max = FilterToNumber($in{'Disp_Max'}) if ($in{'Disp_Max'} ne "auto" && $in{'Disp_Max'} ne "");
-if ($Disp_Min ne 'auto' && ! ($Disp_Min =~ /^[\d\.]+$/)) {
- $error .= "Display Minimum must be 'auto' or numeric (received '$Disp_Min')
";
+if ($Disp_Min ne 'auto' && ! ($Disp_Min =~ /^[\d\.\-]+$/)) {
+ $error .= "Display Minimum must be 'auto' or numeric (received $Disp_Min)
";
}
-if ($Disp_Max ne 'auto' && ! ($Disp_Max =~ /^[\d\.]+$/)) {
- $error .= "Display Maximum must be 'auto' or numeric (received '$Disp_Max')
";
+if ($Disp_Max ne 'auto' && ! ($Disp_Max =~ /^[\d\.\-]+$/)) {
+ $error .= "Display Maximum must be 'auto' or numeric (received $Disp_Max)
";
}
my $MPI_Str = FilterMetaChars($in{'MPI'});
@@ -282,6 +282,6 @@ sub FilterMetaChars
sub FilterToNumber
{
my $var = pop(@_);
- $var =~ /^(\d*\.*\d*)$/;
+ $var =~ /^(\-*\d*\.*\d*)$/;
$1;
}