diff options
author | hobbs <hobbs@noemail.net> | 2000-05-18 21:37:19 (GMT) |
---|---|---|
committer | hobbs <hobbs@noemail.net> | 2000-05-18 21:37:19 (GMT) |
commit | 40a80f69837b9fcaaa953eef4d3aa4926889f300 (patch) | |
tree | 2ea96c5021ec2204c9c3d078151dbb0105b319b4 /library/init.tcl | |
parent | c3d8388f33435ef0d6e660a4bc6c62197a6ba5b6 (diff) | |
download | tcl-40a80f69837b9fcaaa953eef4d3aa4926889f300.zip tcl-40a80f69837b9fcaaa953eef4d3aa4926889f300.tar.gz tcl-40a80f69837b9fcaaa953eef4d3aa4926889f300.tar.bz2 |
* library/init.tcl (auto_import): added check to see if a valid
pattern was coming in, to avoid simple error cases [Bug: 3326]
FossilOrigin-Name: 27f03541126b804f94b98b41b3749cd085e1499c
Diffstat (limited to 'library/init.tcl')
-rw-r--r-- | library/init.tcl | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/library/init.tcl b/library/init.tcl index 941c5d6..ad0d697 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.40 2000/05/03 00:15:06 hobbs Exp $ +# RCS: @(#) $Id: init.tcl,v 1.41 2000/05/18 21:37:19 hobbs Exp $ # # Copyright (c) 1991-1993 The Regents of the University of California. # Copyright (c) 1994-1996 Sun Microsystems, Inc. @@ -455,6 +455,12 @@ proc auto_qualify {cmd namespace} { proc auto_import {pattern} { global auto_index + # If no namespace is specified, this will be an error case + + if {![string match *::* $pattern]} { + return + } + set ns [uplevel namespace current] set patternList [auto_qualify $pattern $ns] |