mirror of
https://gitlab.com/shorewall/code.git
synced 2024-12-19 12:50:57 +01:00
Correct check for leading zeros in action variables.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
409c427134
commit
11d4e92a29
@ -2483,7 +2483,7 @@ sub expand_variables( \$ ) {
|
||||
my $val;
|
||||
|
||||
if ( $var =~ /^\d+$/ ) {
|
||||
fatal_error "Undefined parameter (\$$var)" if ( ! defined $actparms[$var] ) || ( length( $var ) > 0 && $var =~ /^0/ );
|
||||
fatal_error "Undefined parameter (\$$var)" if ( ! defined $actparms[$var] ) || ( length( $var ) > 1 && $var =~ /^0/ );
|
||||
$val = $var ? $actparms[$var] : $actparms[0]->{name};
|
||||
} elsif ( exists $params{$var} ) {
|
||||
$val = $params{$var};
|
||||
|
Loading…
Reference in New Issue
Block a user