From 79b5c38ecb28c7d50254b861e63adad337208428 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Sat, 14 Apr 2012 10:14:25 -0700 Subject: [PATCH] Handle trailing whitespace in Shorewall::Config::read_a_line1() Signed-off-by: Tom Eastep --- Shorewall/Perl/Shorewall/Config.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Shorewall/Perl/Shorewall/Config.pm b/Shorewall/Perl/Shorewall/Config.pm index 485da6348..9543b87ae 100644 --- a/Shorewall/Perl/Shorewall/Config.pm +++ b/Shorewall/Perl/Shorewall/Config.pm @@ -2269,8 +2269,9 @@ sub read_a_line1() { while ( $currentline = <$currentfile> ) { next if $currentline =~ /^\s*#/; chomp $currentline; - next if $currentline =~ /^\s*$/; $currentline =~ s/#.*$//; # Remove Trailing Comments + $currentline =~ s/\s*$//; # Remove Trailing Whitespace + next if $currentline =~ /^\s*$/; fatal_error "Non-ASCII gunk in file" if $currentline =~ /[^\s[:print:]]/; $currentlinenumber = $.; print "IN===> $currentline\n" if $debug;