summaryrefslogtreecommitdiffstats
path: root/generic/tclVar.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2010-02-04 13:46:31 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2010-02-04 13:46:31 (GMT)
commitecc5f96727b39eebbad74ffe0e0dfaabc059d686 (patch)
treeb4075be345e93f2d5238da54862cf87d583bf9ac /generic/tclVar.c
parent81589b0f3b1476474b101a8677920c15742058e8 (diff)
downloadtcl-ecc5f96727b39eebbad74ffe0e0dfaabc059d686.zip
tcl-ecc5f96727b39eebbad74ffe0e0dfaabc059d686.tar.gz
tcl-ecc5f96727b39eebbad74ffe0e0dfaabc059d686.tar.bz2
Make [array get] work again with a trivial pattern.
Diffstat (limited to 'generic/tclVar.c')
-rw-r--r--generic/tclVar.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/generic/tclVar.c b/generic/tclVar.c
index f39383d..63aebca 100644
--- a/generic/tclVar.c
+++ b/generic/tclVar.c
@@ -16,7 +16,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclVar.c,v 1.191 2010/02/04 10:53:34 dkf Exp $
+ * RCS: @(#) $Id: tclVar.c,v 1.192 2010/02/04 13:46:32 dkf Exp $
*/
#include "tclInt.h"
@@ -3558,7 +3558,7 @@ ArrayGetCmd(
TclNewObj(nameLstPtr);
Tcl_IncrRefCount(nameLstPtr);
if ((pattern != NULL) && TclMatchIsTrivial(pattern)) {
- varPtr2 = VarHashFindVar(varPtr->value.tablePtr, objv[3]);
+ varPtr2 = VarHashFindVar(varPtr->value.tablePtr, objv[2]);
if (varPtr2 == NULL) {
goto searchDone;
}
@@ -3736,12 +3736,12 @@ ArrayNamesCmd(
patternPtr = objv[2];
pattern = TclGetString(patternPtr);
} else if (objc == 4) {
- patternPtr = objv[3];
- pattern = TclGetString(patternPtr);
if (Tcl_GetIndexFromObj(interp, objv[2], options, "option", 0,
&mode) != TCL_OK) {
return TCL_ERROR;
}
+ patternPtr = objv[3];
+ pattern = TclGetString(patternPtr);
} else {
patternPtr = NULL;
pattern = NULL;