summaryrefslogtreecommitdiffstats
path: root/generic/tclExecute.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclExecute.c')
-rw-r--r--generic/tclExecute.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/generic/tclExecute.c b/generic/tclExecute.c
index 46dab96..efbea33 100644
--- a/generic/tclExecute.c
+++ b/generic/tclExecute.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclExecute.c,v 1.144 2004/07/03 21:36:33 msofer Exp $
+ * RCS: @(#) $Id: tclExecute.c,v 1.145 2004/07/11 21:56:01 msofer Exp $
*/
#ifdef STDC_HEADERS
@@ -4781,6 +4781,20 @@ TclExecuteByteCode(interp, codePtr)
iPtr->flags |= ERR_ALREADY_LOGGED;
}
}
+
+ /*
+ * Clear all expansions that may have started after the last
+ * INST_BEGIN_CATCH.
+ */
+
+ while ((expandNestList != NULL) && ((catchTop == initCatchTop) ||
+ ((ptrdiff_t) eePtr->stackPtr[catchTop] <=
+ (ptrdiff_t) expandNestList->internalRep.twoPtrValue.ptr1))) {
+ Tcl_Obj *objPtr = expandNestList->internalRep.twoPtrValue.ptr2;
+ TclDecrRefCount(expandNestList);
+ expandNestList = objPtr;
+ }
+
/*
* We must not catch an exceeded limit. Instead, it blows
* outwards until we either hit another interpreter (presumably