From e8c9c04e812a25ce08a60dfca669900fefebb75b Mon Sep 17 00:00:00 2001 From: ericm Date: Tue, 20 Jun 2000 21:28:11 +0000 Subject: Applied patch from [Bug: 5922] --- ChangeLog | 5 +++++ library/opt/optparse.tcl | 4 ++-- library/opt0.4/optparse.tcl | 4 ++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index e82c8ef..7d7963e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2000-06-20 Eric Melski + + * library/opt0.4/optparse.tcl: Applied patch from [Bug: 5922], which + corrected an incorrect use of [string match]. + 2000-06-19 Eric Melski * doc/RegExp.3: Replaced instances of "Tcl_GetRegExpInfo" with diff --git a/library/opt/optparse.tcl b/library/opt/optparse.tcl index 289a39a..eabb734 100644 --- a/library/opt/optparse.tcl +++ b/library/opt/optparse.tcl @@ -8,7 +8,7 @@ # on it. If your code does rely on this package you # may directly incorporate this code into your application. # -# RCS: @(#) $Id: optparse.tcl,v 1.2 1999/04/16 00:47:18 stanton Exp $ +# RCS: @(#) $Id: optparse.tcl,v 1.3 2000/06/20 21:28:11 ericm Exp $ package provide opt 0.4.1 @@ -253,7 +253,7 @@ proc ::tcl::OptParse {desc arglist} { # into local variable named "Args". proc ::tcl::OptProc {name desc body} { set namespace [uplevel namespace current]; - if { ([string match $name "::*"]) + if { ([string match "::*" $name]) || ([string compare $namespace "::"]==0)} { # absolute name or global namespace, name is the key set key $name; diff --git a/library/opt0.4/optparse.tcl b/library/opt0.4/optparse.tcl index 289a39a..eabb734 100644 --- a/library/opt0.4/optparse.tcl +++ b/library/opt0.4/optparse.tcl @@ -8,7 +8,7 @@ # on it. If your code does rely on this package you # may directly incorporate this code into your application. # -# RCS: @(#) $Id: optparse.tcl,v 1.2 1999/04/16 00:47:18 stanton Exp $ +# RCS: @(#) $Id: optparse.tcl,v 1.3 2000/06/20 21:28:11 ericm Exp $ package provide opt 0.4.1 @@ -253,7 +253,7 @@ proc ::tcl::OptParse {desc arglist} { # into local variable named "Args". proc ::tcl::OptProc {name desc body} { set namespace [uplevel namespace current]; - if { ([string match $name "::*"]) + if { ([string match "::*" $name]) || ([string compare $namespace "::"]==0)} { # absolute name or global namespace, name is the key set key $name; -- cgit v0.12