diff options
author | rideout <rideout@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2005-01-11 02:55:41 +0000 |
---|---|---|
committer | rideout <rideout@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2005-01-11 02:55:41 +0000 |
commit | 450bfdca0057928de18c78d6f0c35bf596094b96 (patch) | |
tree | 742472eefcd211d410ec9303ecbe8d8fc51660ab /lib/sbin/parameter_parser.pl | |
parent | 29eac2ca1a21f68d33eb0a3d04deeed99031bd5f (diff) |
Fixed two bugs in handling of invalid datatypes such CCTK_INT8, one of which
caused the CST to hang.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3955 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib/sbin/parameter_parser.pl')
-rw-r--r-- | lib/sbin/parameter_parser.pl | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/sbin/parameter_parser.pl b/lib/sbin/parameter_parser.pl index a2bf708b..f1f7151f 100644 --- a/lib/sbin/parameter_parser.pl +++ b/lib/sbin/parameter_parser.pl @@ -227,8 +227,7 @@ sub parse_param_ccl $message = "Duplicate parameter $variable in thorn $thorn. Ignoring second definition"; &CST_error(1,$message,"",__LINE__,__FILE__); - - $line_number++ until ($data[$line_number] =~ m:\}:); + $line_number++ until ($line_number>@data || $data[$line_number] =~ m:\}:); } elsif($use_or_extend && $use_or_extend =~ m:(EXTENDS|USES):i && $block !~ m:SHARES\s*\S:) { @@ -477,7 +476,7 @@ sub parse_param_ccl } else { - $line =~ /^(.*)\n+$/; + $line =~ /^(.*)\n*$/; $message = "Unknown line in param.ccl for thorn $thorn\n\"$1\""; &CST_error(0,$message,"",__LINE__,__FILE__); } @@ -485,7 +484,7 @@ sub parse_param_ccl } $parameter_db{"\U$thorn\E SHARES implementations"} = join(" ", sort keys %friends); - + return %parameter_db; } |