summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2024-06-12 13:40:18 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2024-06-12 13:40:18 (GMT)
commite4a0bd43132f37661c7177534ec26a6c34a2cb9d (patch)
tree6f42f37ac4efb2c54d7bd634ecf3349410349d39 /library
parentaacd5eef2d2bf6b7d03aad0941282762e8957566 (diff)
downloadtcl-e4a0bd43132f37661c7177534ec26a6c34a2cb9d.zip
tcl-e4a0bd43132f37661c7177534ec26a6c34a2cb9d.tar.gz
tcl-e4a0bd43132f37661c7177534ec26a6c34a2cb9d.tar.bz2
Move BOM handling a few lines later
Diffstat (limited to 'library')
-rw-r--r--library/safe.tcl8
1 files 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
}