summaryrefslogtreecommitdiffstats
path: root/generic/tclVar.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclVar.c')
-rw-r--r--generic/tclVar.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/generic/tclVar.c b/generic/tclVar.c
index 17b859c..c723e84 100644
--- a/generic/tclVar.c
+++ b/generic/tclVar.c
@@ -15,7 +15,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.128 2007/03/12 18:06:14 dgp Exp $
+ * RCS: @(#) $Id: tclVar.c,v 1.129 2007/04/03 01:34:39 msofer Exp $
*/
#include "tclInt.h"
@@ -3243,7 +3243,7 @@ ObjMakeUpvar(
*/
if (index < 0) {
- if (((otherP2 ? arrayPtr->nsPtr : otherPtr->nsPtr) == NULL)
+ if (((arrayPtr ? arrayPtr->nsPtr : otherPtr->nsPtr) == NULL)
&& ((myFlags & (TCL_GLOBAL_ONLY | TCL_NAMESPACE_ONLY))
|| (varFramePtr == NULL)
|| !HasLocalVars(varFramePtr)
@@ -3301,6 +3301,7 @@ TclPtrMakeUpvar(
Tcl_Panic("ObjMakeUpvar called with an index outside from a proc");
}
varPtr = &(varFramePtr->compiledLocals[index]);
+ myName = varPtr->name;
} else {
/*
* Do not permit the new variable to look like an array reference, as