summaryrefslogtreecommitdiffstats
path: root/generic/tclCompCmds.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2012-02-15 09:51:12 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2012-02-15 09:51:12 (GMT)
commit5ab653feb0f92621dfa72b70722477353ae22c75 (patch)
tree15ffd01c86b50f1a31f9efed63079cb78f8d839c /generic/tclCompCmds.c
parent9d25d39845a0c2c1c3282634394e39a542ae0d9e (diff)
downloadtcl-5ab653feb0f92621dfa72b70722477353ae22c75.zip
tcl-5ab653feb0f92621dfa72b70722477353ae22c75.tar.gz
tcl-5ab653feb0f92621dfa72b70722477353ae22c75.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);