Skip to content

Commit e4a0bd4

Browse files
author
jan.nijtmans
committed
Move BOM handling a few lines later
1 parent aacd5ee commit e4a0bd4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

library/safe.tcl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -987,14 +987,14 @@ proc ::safe::AliasSource {child args} {
987987
fconfigure $f -encoding $encoding
988988
}
989989
set contents [read $f]
990-
# See [Bug 1d26e580cf]
991-
if {[string index $contents 0] eq "\uFEFF"} {
992-
set contents [string range $contents 1 end]
993-
}
994990
close $f
995991
::interp eval $child [list info script $file]
996992
} msg opt]
997993
if {$code == 0} {
994+
# See [Bug 1d26e580cf]
995+
if {[string index $contents 0] eq "\uFEFF"} {
996+
set contents [string range $contents 1 end]
997+
}
998998
set code [catch {::interp eval $child $contents} msg opt]
999999
set replacementMsg $msg
10001000
}

0 commit comments

Comments
 (0)