summaryrefslogtreecommitdiffstats
path: root/generic/tclCompCmds.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclCompCmds.c')
-rw-r--r--generic/tclCompCmds.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/generic/tclCompCmds.c b/generic/tclCompCmds.c
index 7997efa..e071bbd 100644
--- a/generic/tclCompCmds.c
+++ b/generic/tclCompCmds.c
@@ -645,6 +645,11 @@ TclCompileCatchCmd(
(int)(CurrentOffset(envPtr) - jumpFixup.codeOffset));
}
+ /*
+ * Push the return options if the caller wants them. This needs to happen
+ * before INST_END_CATCH
+ */
+
if (optsIndex != -1) {
TclEmitOpcode( INST_PUSH_RETURN_OPTIONS, envPtr);
}
@@ -656,7 +661,8 @@ TclCompileCatchCmd(
TclEmitOpcode( INST_END_CATCH, envPtr);
/*
- * Push the return options if the caller wants them.
+ * Save the result and return options if the caller wants them. This needs
+ * to happen after INST_END_CATCH (compile-3.6/7).
*/
if (optsIndex != -1) {