From e4a0bd43132f37661c7177534ec26a6c34a2cb9d Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Wed, 12 Jun 2024 13:40:18 +0000 Subject: Move BOM handling a few lines later --- library/safe.tcl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/library/safe.tcl b/library/safe.tcl index 9c605f2..5baacb5 100644 --- a/library/safe.tcl +++ b/library/safe.tcl @@ -987,14 +987,14 @@ proc ::safe::AliasSource {child args} { fconfigure $f -encoding $encoding } set contents [read $f] - # See [Bug 1d26e580cf] - if {[string index $contents 0] eq "\uFEFF"} { - set contents [string range $contents 1 end] - } close $f ::interp eval $child [list info script $file] } msg opt] if {$code == 0} { + # See [Bug 1d26e580cf] + if {[string index $contents 0] eq "\uFEFF"} { + set contents [string range $contents 1 end] + } set code [catch {::interp eval $child $contents} msg opt] set replacementMsg $msg } -- cgit v0.12