diff options
author | dgp <dgp@users.sourceforge.net> | 2003-07-18 23:35:37 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2003-07-18 23:35:37 (GMT) |
commit | fdd69a570a341046d7c40bd5809298aa1504b2ba (patch) | |
tree | 0580485f72aa65d80f29849145a21e23f8252d07 /library/init.tcl | |
parent | 9e2c8524411f3f35025c354c7b90c2c2bdc3703e (diff) | |
download | tcl-fdd69a570a341046d7c40bd5809298aa1504b2ba.zip tcl-fdd69a570a341046d7c40bd5809298aa1504b2ba.tar.gz tcl-fdd69a570a341046d7c40bd5809298aa1504b2ba.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:
Diffstat (limited to 'library/init.tcl')
-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\"" # |