diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2024-02-06 14:16:57 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2024-02-06 14:16:57 (GMT) |
commit | d34da70956cd6d83d29f173e352d8f11b1473085 (patch) | |
tree | d7d37d6e1cfd0d0a58996ee2399418c3d76a73cd | |
parent | 1d283a9126a5736f9715f14f100d9d13febc649a (diff) | |
download | tcl-d34da70956cd6d83d29f173e352d8f11b1473085.zip tcl-d34da70956cd6d83d29f173e352d8f11b1473085.tar.gz tcl-d34da70956cd6d83d29f173e352d8f11b1473085.tar.bz2 |
Proposed fix for [86b3c15f0c]: ::unknown has infinite recursion in a corner case
-rw-r--r-- | library/init.tcl | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/library/init.tcl b/library/init.tcl index 9412e00..188cb3d 100644 --- a/library/init.tcl +++ b/library/init.tcl @@ -371,7 +371,10 @@ proc unknown args { return -options $::tcl::UnknownOptions $::tcl::UnknownResult } - set ret [catch {set candidates [info commands $name*]} msg] + set ret [catch [list uplevel 1 [list info commands $name*]] msg] + if {$ret == 0} { + set candidates $msg + } if {$name eq "::"} { set name "" } |