From 4e17c8b0017c00e793ec20ddc57e0b3365d2ee5c Mon Sep 17 00:00:00 2001 From: Douglas Clowes Date: Tue, 13 May 2014 17:41:32 +1000 Subject: [PATCH] Fix string range arguments for removing quotes --- site_ansto/instrument/util/config_reader.tcl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/site_ansto/instrument/util/config_reader.tcl b/site_ansto/instrument/util/config_reader.tcl index 482f6203..40124cd0 100644 --- a/site_ansto/instrument/util/config_reader.tcl +++ b/site_ansto/instrument/util/config_reader.tcl @@ -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 }