From 7cc2f91e661b172fcf87f4f7390b1ef2faed349a Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Fri, 1 Jul 2011 16:34:55 -0700 Subject: [PATCH] Revert "Simplify push_action_params()" This reverts commit 34c788d67d8991fccdb4fe0845b008a64af99e31. --- Shorewall/Perl/Shorewall/Config.pm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Shorewall/Perl/Shorewall/Config.pm b/Shorewall/Perl/Shorewall/Config.pm index 664b0da3a..d8b6cd099 100644 --- a/Shorewall/Perl/Shorewall/Config.pm +++ b/Shorewall/Perl/Shorewall/Config.pm @@ -1803,11 +1803,14 @@ sub embedded_perl( $ ) { sub push_action_params( $ ) { my @params = split /,/, $_[0]; my $oldparams = \@actparms; - my $params = @params; @actparms = (); - @actparms[1..$params] = @params; + for ( my $i = 1; $i <= @params; $i++ ) { + my $val = $params[$i - 1]; + + $actparms[$i] = $val eq '-' ? '' : $val eq '--' ? '-' : $val; + } $oldparams; }