diff options
author | hobbs <hobbs@noemail.net> | 2001-03-24 01:14:10 (GMT) |
---|---|---|
committer | hobbs <hobbs@noemail.net> | 2001-03-24 01:14:10 (GMT) |
commit | ea3bf42108a7ba517e093b0c8e066ecbb92da3cd (patch) | |
tree | c84c0a016d17edbbe787bc3f13577f905b0ac9c6 /generic/tclVar.c | |
parent | 356c4629917cb4a00dffe1dc1951b0ec0ede409b (diff) | |
download | tcl-ea3bf42108a7ba517e093b0c8e066ecbb92da3cd.zip tcl-ea3bf42108a7ba517e093b0c8e066ecbb92da3cd.tar.gz tcl-ea3bf42108a7ba517e093b0c8e066ecbb92da3cd.tar.bz2 |
* generic/tclVar.c (Tcl_ArrayObjCmd): Corrected retrieval of
resultPtr to prevent possible corruption.
FossilOrigin-Name: a0fe604f1e2e0f8c1319bcd687e53bf36a051f4e
Diffstat (limited to 'generic/tclVar.c')
-rw-r--r-- | generic/tclVar.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/generic/tclVar.c b/generic/tclVar.c index bba5e4f..73e2fcd 100644 --- a/generic/tclVar.c +++ b/generic/tclVar.c @@ -14,7 +14,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.29 2001/03/13 11:18:48 dkf Exp $ + * RCS: @(#) $Id: tclVar.c,v 1.30 2001/03/24 01:14:11 hobbs Exp $ */ #include "tclInt.h" @@ -2915,7 +2915,7 @@ Tcl_ArrayObjCmd(dummy, interp, objc, objv) Interp *iPtr = (Interp *) interp; Var *varPtr, *arrayPtr; Tcl_HashEntry *hPtr; - Tcl_Obj *resultPtr = Tcl_GetObjResult(interp); + Tcl_Obj *resultPtr; int notArray; char *varName, *msg; int index, result; @@ -2961,6 +2961,13 @@ Tcl_ArrayObjCmd(dummy, interp, objc, objv) } } + /* + * We have to wait to get the resultPtr until here because + * CallTraces can affect the result. + */ + + resultPtr = Tcl_GetObjResult(interp); + switch (index) { case ARRAY_ANYMORE: { ArraySearch *searchPtr; |