diff options
author | dgp <dgp@users.sourceforge.net> | 2020-09-15 16:24:35 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2020-09-15 16:24:35 (GMT) |
commit | 1d9b09692dbf8ea343c44f4cca02676ad091cb41 (patch) | |
tree | 69afca4a2608cd608a858ca5d7573654a8669906 /library/init.tcl | |
parent | d281b9c141c0bd3b4795601f63caa11b4c9a6941 (diff) | |
parent | 52f93c85fd4b12afc887e78f895f6dd7e33983db (diff) | |
download | tcl-1d9b09692dbf8ea343c44f4cca02676ad091cb41.zip tcl-1d9b09692dbf8ea343c44f4cca02676ad091cb41.tar.gz tcl-1d9b09692dbf8ea343c44f4cca02676ad091cb41.tar.bz2 |
merge 8.6
Diffstat (limited to 'library/init.tcl')
-rw-r--r-- | library/init.tcl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/library/init.tcl b/library/init.tcl index 1841170..6f1e7ed 100644 --- a/library/init.tcl +++ b/library/init.tcl @@ -313,7 +313,7 @@ proc unknown args { set errInfo [string range $errInfo 0 $last-1] set tail "\"$cinfo\"" set last [string last $tail $errInfo] - if {$last + [string length $tail] != [string length $errInfo]} { + if {$last < 0 || $last + [string length $tail] != [string length $errInfo]} { return -code error -errorcode $errCode \ -errorinfo $errInfo $msg } @@ -797,7 +797,7 @@ proc tcl::CopyDirectory {action src dest} { } } } else { - if {[string first $nsrc $ndest] != -1} { + if {[string first $nsrc $ndest] >= 0} { set srclen [expr {[llength [file split $nsrc]] - 1}] set ndest [lindex [file split $ndest] $srclen] if {$ndest eq [file tail $nsrc]} { |