diff options
author | dgp <dgp@users.sourceforge.net> | 2008-10-19 19:54:22 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2008-10-19 19:54:22 (GMT) |
commit | 6ca3ccd39cb05badbe9504755fc01940035b513e (patch) | |
tree | 4313789e73cdc9b413c3c10745ac4ae32a87f5d3 | |
parent | c38bc9cb5af50362b82d645ec2eb8feb49357ef4 (diff) | |
download | tcl-6ca3ccd39cb05badbe9504755fc01940035b513e.zip tcl-6ca3ccd39cb05badbe9504755fc01940035b513e.tar.gz tcl-6ca3ccd39cb05badbe9504755fc01940035b513e.tar.bz2 |
* generic/tclProc.c: Reset -level and -code values to defaults
after they are used. [Bug 2152286].
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | generic/tclProc.c | 7 |
2 files changed, 11 insertions, 1 deletions
@@ -1,3 +1,8 @@ +2008-10-19 Don Porter <dgp@users.sourceforge.net> + + * generic/tclProc.c: Reset -level and -code values to defaults + after they are used. [Bug 2152286]. + 2008-10-16 Don Porter <dgp@users.sourceforge.net> * library/init.tcl: Revised [unknown] so that it carefully diff --git a/generic/tclProc.c b/generic/tclProc.c index bf67600..9313154 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.139.2.3 2008/08/11 19:01:59 andreas_kupries Exp $ + * RCS: @(#) $Id: tclProc.c,v 1.139.2.4 2008/10/19 19:54:22 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; } |