Fix string range arguments for removing quotes
This commit is contained in:
@ -70,11 +70,11 @@ proc config_reader::parse_file {filename} {
|
||||
set value [string trim [lindex $pair 1] " "]
|
||||
# Remove matching quotes on both ends (single, double and braces)
|
||||
if { [string index $value 0] == "'" && [string index $value end] == "'" } {
|
||||
set value [string range 1 end-1]
|
||||
set value [string range $value 1 end-1]
|
||||
} elseif { [string index $value 0] == "\"" && [string index $value end] == "\"" } {
|
||||
set value [string range 1 end-1]
|
||||
set value [string range $value 1 end-1]
|
||||
} elseif { [string index $value 0] == "{" && [string index $value end] == "}" } {
|
||||
set value [string range 1 end-1]
|
||||
set value [string range $value 1 end-1]
|
||||
}
|
||||
config_reader::set_var dictionary $cursection $name $value
|
||||
}
|
||||
|
Reference in New Issue
Block a user