diff options
author | dgp <dgp@users.sourceforge.net> | 2008-10-19 19:55:37 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2008-10-19 19:55:37 (GMT) |
commit | 7f623a9fc32a746e0fe85c9f913cbb1f81e92f8a (patch) | |
tree | d84a7ea00f0c6f7db5def3bb0300d496ea29c305 | |
parent | 16612f43c29a1083805afc944354b3e07311e161 (diff) | |
download | tcl-7f623a9fc32a746e0fe85c9f913cbb1f81e92f8a.zip tcl-7f623a9fc32a746e0fe85c9f913cbb1f81e92f8a.tar.gz tcl-7f623a9fc32a746e0fe85c9f913cbb1f81e92f8a.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-19 Donal K. Fellows <dkf@users.sf.net> * generic/tclBasic.c (TclInfoCoroutineCmd): Added code to make this 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; } |