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 | b48c6ea6c1f6c8a6cf870c15799cf33cb88d0b7d (patch) | |
tree | 0580485f72aa65d80f29849145a21e23f8252d07 /library/init.tcl | |
parent | 7265d5487c6af7a62eb6a02dbb439f996b49e826 (diff) | |
download | tcl-b48c6ea6c1f6c8a6cf870c15799cf33cb88d0b7d.zip tcl-b48c6ea6c1f6c8a6cf870c15799cf33cb88d0b7d.tar.gz tcl-b48c6ea6c1f6c8a6cf870c15799cf33cb88d0b7d.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\"" # |