diff options
-rw-r--r-- | generic/tclVar.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/generic/tclVar.c b/generic/tclVar.c index c4cc847..12adf5e 100644 --- a/generic/tclVar.c +++ b/generic/tclVar.c @@ -13,7 +13,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.1.2.2 1998/09/24 23:59:04 stanton Exp $ + * RCS: @(#) $Id: tclVar.c,v 1.1.2.3 1998/11/06 21:51:57 stanton Exp $ */ #include "tclInt.h" @@ -641,6 +641,7 @@ TclGetIndexedScalar(interp, localIndex, leaveErrorMsg) Var *compiledLocals = varFramePtr->compiledLocals; register Var *varPtr; /* Points to the variable's in-frame Var * structure. */ + char *varName; /* Name of the local variable. */ char *msg; #ifdef TCL_COMPILE_DEBUG @@ -660,6 +661,7 @@ TclGetIndexedScalar(interp, localIndex, leaveErrorMsg) #endif /* TCL_COMPILE_DEBUG */ varPtr = &(compiledLocals[localIndex]); + varName = varPtr->name; /* * If varPtr is a link variable, we have a reference to some variable @@ -677,11 +679,11 @@ TclGetIndexedScalar(interp, localIndex, leaveErrorMsg) */ if (varPtr->tracePtr != NULL) { - msg = CallTraces(iPtr, /*arrayPtr*/ NULL, varPtr, varPtr->name, - NULL, TCL_TRACE_READS); + msg = CallTraces(iPtr, /*arrayPtr*/ NULL, varPtr, varName, NULL, + TCL_TRACE_READS); if (msg != NULL) { if (leaveErrorMsg) { - VarErrMsg(interp, varPtr->name, NULL, "read", msg); + VarErrMsg(interp, varName, NULL, "read", msg); } return NULL; } @@ -699,7 +701,7 @@ TclGetIndexedScalar(interp, localIndex, leaveErrorMsg) } else { msg = noSuchVar; } - VarErrMsg(interp, varPtr->name, NULL, "read", msg); + VarErrMsg(interp, varName, NULL, "read", msg); } return NULL; |