diff options
author | dgp <dgp@noemail.net> | 2003-07-18 23:35:37 (GMT) |
---|---|---|
committer | dgp <dgp@noemail.net> | 2003-07-18 23:35:37 (GMT) |
commit | c45595142e32e696a7b2d1c60f3642cb5cdb9865 (patch) | |
tree | 0580485f72aa65d80f29849145a21e23f8252d07 /library | |
parent | 03888b1fcd8455e662fda1d186eb56b842da94b5 (diff) | |
download | tcl-c45595142e32e696a7b2d1c60f3642cb5cdb9865.zip tcl-c45595142e32e696a7b2d1c60f3642cb5cdb9865.tar.gz tcl-c45595142e32e696a7b2d1c60f3642cb5cdb9865.tar.bz2 |
* generic/tclBasic.c: Corrected several instances of unsafe
* generic/tclCompile.c: truncation of UTF-8 strings that might
* generic/tclProc.c: break apart a multi-byte character.
* library/init.tcl: [Bug 760872]
* tests/init.test:
FossilOrigin-Name: d50fc184389381175baedb204ed4fc23f9e1e0f5
Diffstat (limited to 'library')
-rw-r--r-- | library/init.tcl | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/library/init.tcl b/library/init.tcl index e5a5d0f..8ad26f9 100644 --- a/library/init.tcl +++ b/library/init.tcl @@ -3,7 +3,7 @@ # Default system startup file for Tcl-based applications. Defines # "unknown" procedure and auto-load facilities. # -# RCS: @(#) $Id: init.tcl,v 1.55 2002/11/23 01:41:35 hobbs Exp $ +# RCS: @(#) $Id: init.tcl,v 1.55.2.1 2003/07/18 23:35:39 dgp Exp $ # # Copyright (c) 1991-1993 The Regents of the University of California. # Copyright (c) 1994-1996 Sun Microsystems, Inc. @@ -220,10 +220,12 @@ proc unknown args { # construct the stack trace. # set cinfo $args - if {[string length $cinfo] > 150} { - set cinfo "[string range $cinfo 0 149]..." + set ellipsis "" + while {[string bytelength $cinfo] > 150} { + set cinfo [string range $cinfo 0 end-1] + set ellipsis "..." } - append cinfo "\"\n (\"uplevel\" body line 1)" + append cinfo $ellipsis "\"\n (\"uplevel\" body line 1)" append cinfo "\n invoked from within" append cinfo "\n\"uplevel 1 \$args\"" # |