summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authorhobbs <hobbs@noemail.net>2000-08-07 21:31:32 (GMT)
committerhobbs <hobbs@noemail.net>2000-08-07 21:31:32 (GMT)
commit767e70e996f68f94d4f883e0ab9f0357971e402e (patch)
tree36733a510ee54a225fae26f510fa73d3a4a40492 /library
parent83b305c890519fc7839f332b440dd6cc82b8f199 (diff)
downloadtcl-767e70e996f68f94d4f883e0ab9f0357971e402e.zip
tcl-767e70e996f68f94d4f883e0ab9f0357971e402e.tar.gz
tcl-767e70e996f68f94d4f883e0ab9f0357971e402e.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: 8fd7dc9f232e84743cd9ba739e46d47e4a77aedb
Diffstat (limited to 'library')
-rw-r--r--library/init.tcl8
1 files changed, 7 insertions, 1 deletions
diff --git a/library/init.tcl b/library/init.tcl
index 0b3d546..f8a9ffe 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.39 2000/02/01 19:26:08 ericm Exp $
+# RCS: @(#) $Id: init.tcl,v 1.39.2.1 2000/08/07 21:31:33 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]