diff --git a/config/cfgroot/general-functions.pl b/config/cfgroot/general-functions.pl
index 2d3eb73d7..04e36969c 100644
--- a/config/cfgroot/general-functions.pl
+++ b/config/cfgroot/general-functions.pl
@@ -151,7 +151,7 @@ sub readhash
 		chop;
 
 		# Skip comments.
-		next if ($_ =~ /\#/);
+		next if ($_ =~ /^#/);
 
 		($var, $val) = split /=/, $_, 2;
 		if ($var)
