From 3f9025befdcf51f306a1de453e0b7618c6caa3bd Mon Sep 17 00:00:00 2001 From: Philipp Ittershagen Date: Tue, 4 Feb 2014 17:12:17 +0100 Subject: [PATCH] Skip comments before checking for control characters. --- mr | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mr b/mr index 5025e6e..22516a0 100755 --- a/mr +++ b/mr @@ -1325,11 +1325,12 @@ sub loadconfig { while (@lines) { $_=$nextline->(); + next if /^\s*\#/ || /^\s*$/; + if (! $trusted && /[[:cntrl:]]/) { $trusterror->("illegal control character"); } - next if /^\s*\#/ || /^\s*$/; if (/^\[([^\]]*)\]\s*$/) { $section=$1; -- 2.39.5