diff options
author | dgp <dgp@noemail.net> | 2008-10-19 19:54:21 (GMT) |
---|---|---|
committer | dgp <dgp@noemail.net> | 2008-10-19 19:54:21 (GMT) |
commit | 02dffdad96ead2f3814c1639b8f24a738d4751a6 (patch) | |
tree | 4313789e73cdc9b413c3c10745ac4ae32a87f5d3 /generic/tclProc.c | |
parent | 0a139d35800f5023814939d25e3089a5fe2b5df9 (diff) | |
download | tcl-02dffdad96ead2f3814c1639b8f24a738d4751a6.zip tcl-02dffdad96ead2f3814c1639b8f24a738d4751a6.tar.gz tcl-02dffdad96ead2f3814c1639b8f24a738d4751a6.tar.bz2 |
* generic/tclProc.c: Reset -level and -code values to defaults
after they are used. [Bug 2152286].
FossilOrigin-Name: c2b0a6b40d763451d945c7c8a6553298b03d08bb
Diffstat (limited to 'generic/tclProc.c')
-rw-r--r-- | generic/tclProc.c | 7 |
1 files changed, 6 insertions, 1 deletions
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; } |