--- ini.tcl~	2013-01-23 05:25:50.000000000 +0100
+++ ini.tcl	2013-05-02 10:39:21.000000000 +0200
@@ -115,8 +115,8 @@
     foreach line [split [read $channel] "\n"] {
 	if { [string match "$char*" $line] } {
 	    lappend com [string trim [string range $line [string length $char] end]]
-	} elseif { [string match {\[*\]} $line] } {
-	    ::set cur [string range $line 1 end-1]
+	} elseif { [string match {\[*\]} [string trim $line]] } {
+	    ::set cur [string range [string trim $line] 1 end-1]
 	    if { $cur == "" } { continue }
 	    ::set sections($cur) 1
 	    if { $com != "" } {
