summaryrefslogtreecommitdiffstats
path: root/generic/tclProc.c
diff options
context:
space:
mode:
authordgp@users.sourceforge.net <dgp>2008-10-19 19:55:37 (GMT)
committerdgp@users.sourceforge.net <dgp>2008-10-19 19:55:37 (GMT)
commit4231adaef34542ed0183f37f320fd9a92aa4d825 (patch)
treed84a7ea00f0c6f7db5def3bb0300d496ea29c305 /generic/tclProc.c
parent8848045d828b22549425360ea69c29894463321f (diff)
downloadtcl-4231adaef34542ed0183f37f320fd9a92aa4d825.zip
tcl-4231adaef34542ed0183f37f320fd9a92aa4d825.tar.gz
tcl-4231adaef34542ed0183f37f320fd9a92aa4d825.tar.bz2
* generic/tclProc.c: Reset -level and -code values to defaults
after they are used. [Bug 2152286].
Diffstat (limited to 'generic/tclProc.c')
-rw-r--r--generic/tclProc.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/generic/tclProc.c b/generic/tclProc.c
index a0a608b..e116e92 100644
--- a/generic/tclProc.c
+++ b/generic/tclProc.c
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclProc.c,v 1.165 2008/10/15 06:17:04 nijtmans Exp $
+ * RCS: @(#) $Id: tclProc.c,v 1.166 2008/10/19 19:55:37 dgp Exp $
*/
#include "tclInt.h"
@@ -2239,9 +2239,14 @@ TclUpdateReturnInfo(
if (iPtr->returnLevel == 0) {
/*
* Now we've reached the level to return the requested -code.
+ * Since iPtr->returnLevel and iPtr->returnCode have completed
+ * their task, we now reset them to default values so that any
+ * bare "return TCL_RETURN" that may follow will work [Bug 2152286].
*/
code = iPtr->returnCode;
+ iPtr->returnLevel = 1;
+ iPtr->returnCode = TCL_OK;
if (code == TCL_ERROR) {
iPtr->flags |= ERR_LEGACY_COPY;
}