Disallow superfluous leading zeros in action parameter numbers.

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2012-11-29 08:29:20 -08:00
parent e1524763ad
commit 7bdce1bc97

View File

@ -2481,7 +2481,7 @@ sub expand_variables( \$ ) {
my $val; my $val;
if ( $var =~ /^\d+$/ ) { if ( $var =~ /^\d+$/ ) {
fatal_error "Undefined parameter (\$$var)" unless defined $actparms[$var]; fatal_error "Undefined parameter (\$$var)" if ( ! defined $actparms[$var] ) || ( length( $var ) > 0 && $var =~ /^0/ );
$val = $var ? $actparms[$var] : $actparms[0]->{name}; $val = $var ? $actparms[$var] : $actparms[0]->{name};
} elsif ( exists $params{$var} ) { } elsif ( exists $params{$var} ) {
$val = $params{$var}; $val = $params{$var};