summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorMiguel Sofer <miguel.sofer@gmail.com>2008-07-30 17:30:55 (GMT)
committerMiguel Sofer <miguel.sofer@gmail.com>2008-07-30 17:30:55 (GMT)
commit18213edfa8ddd785f6eda5f24766f09b3c95a909 (patch)
tree422d18193a004c0e830c532651a2e58bc05e141b /generic
parent4e7c533c4c7575412649e7978325ff32cec68d3b (diff)
downloadtcl-18213edfa8ddd785f6eda5f24766f09b3c95a909.zip
tcl-18213edfa8ddd785f6eda5f24766f09b3c95a909.tar.gz
tcl-18213edfa8ddd785f6eda5f24766f09b3c95a909.tar.bz2
* generic/tclBasic.c: guard against the value of iPtr->evalFlags
changing between the times where TEOV and TEOV_exception run. Thanks dgp for catching this.
Diffstat (limited to 'generic')
-rw-r--r--generic/tclBasic.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c
index 0524d5b..7580316 100644
--- a/generic/tclBasic.c
+++ b/generic/tclBasic.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: tclBasic.c,v 1.335 2008/07/29 20:53:21 msofer Exp $
+ * RCS: @(#) $Id: tclBasic.c,v 1.336 2008/07/30 17:30:56 msofer Exp $
*/
#include "tclInt.h"
@@ -4329,7 +4329,8 @@ TEOV_PushExceptionHandlers(
* No CONTINUE or BREAK at level 0, manage RETURN
*/
- TclNRAddCallback(interp, TEOV_Exception, NULL, NULL, NULL, NULL);
+ TclNRAddCallback(interp, TEOV_Exception, INT2PTR(iPtr->evalFlags),
+ NULL, NULL, NULL);
}
}
@@ -4366,7 +4367,7 @@ TEOV_Exception(
int result)
{
Interp *iPtr = (Interp *) interp;
- int allowExceptions = (iPtr->evalFlags & TCL_ALLOW_EXCEPTIONS);
+ int allowExceptions = PTR2INT(data[0]);
if (result != TCL_OK) {
if (result == TCL_RETURN) {