summaryrefslogtreecommitdiffstats
path: root/generic/tclCompCmds.c
diff options
context:
space:
mode:
authordonal.k.fellows@manchester.ac.uk <dkf>2012-02-15 09:51:12 (GMT)
committerdonal.k.fellows@manchester.ac.uk <dkf>2012-02-15 09:51:12 (GMT)
commit56f2df801851e3fae331e26211e8f97bf11ecffd (patch)
tree15ffd01c86b50f1a31f9efed63079cb78f8d839c /generic/tclCompCmds.c
parent8a31f60f8c3906e4b5b0a5d6ade6ebcd82477daf (diff)
downloadtcl-56f2df801851e3fae331e26211e8f97bf11ecffd.zip
tcl-56f2df801851e3fae331e26211e8f97bf11ecffd.tar.gz
tcl-56f2df801851e3fae331e26211e8f97bf11ecffd.tar.bz2
* generic/tclCompCmds.c (TclCompileDictForCmd): [Bug 3487626]: Fix
crash in compilation of [dict for] when its implementation command is used directly rather than through the ensemble.
Diffstat (limited to 'generic/tclCompCmds.c')
-rw-r--r--generic/tclCompCmds.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/generic/tclCompCmds.c b/generic/tclCompCmds.c
index 1f8bd21..9eb74f5 100644
--- a/generic/tclCompCmds.c
+++ b/generic/tclCompCmds.c
@@ -972,7 +972,7 @@ TclCompileDictForCmd(
* Compile the loop body itself. It should be stack-neutral.
*/
- SetLineInformation (4);
+ SetLineInformation(3);
CompileBody(envPtr, bodyTokenPtr, interp);
TclEmitOpcode( INST_POP, envPtr);
@@ -1172,6 +1172,7 @@ TclCompileDictUpdateCmd(
TclEmitInstInt4( INST_BEGIN_CATCH4, range, envPtr);
ExceptionRangeStarts(envPtr, range);
+ SetLineInformation(parsePtr->numWords - 1);
CompileBody(envPtr, bodyTokenPtr, interp);
ExceptionRangeEnds(envPtr, range);