From c309ca307590e978c92b0746aefd92d17ae3bc33 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Fri, 1 Jul 2011 16:23:39 -0700 Subject: [PATCH] Revert "Simplify push_action_params()" This reverts commit 89ee25dde2ef6eac2cf2d4e29aba138416cf2e0f. Signed-off-by: Tom Eastep --- Shorewall/Perl/Shorewall/Config.pm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Shorewall/Perl/Shorewall/Config.pm b/Shorewall/Perl/Shorewall/Config.pm index e23588498..aeab99703 100644 --- a/Shorewall/Perl/Shorewall/Config.pm +++ b/Shorewall/Perl/Shorewall/Config.pm @@ -1803,12 +1803,16 @@ sub embedded_perl( $ ) { sub push_action_params( $$ ) { my @params = split /,/, $_[1]; my $oldparams = \@actparms; - my $params = @params; @actparms = (); $actparms[0] = $_[0]; - @actparms[1..$params] = @params; + + for ( my $i = 1; $i <= @params; $i++ ) { + my $val = $params[$i - 1]; + + $actparms[$i] = $val eq '-' ? '' : $val eq '--' ? '-' : $val; + } $oldparams; }