summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2012-02-15 10:01:34 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2012-02-15 10:01:34 (GMT)
commit3aa1601f2afddd655694ff5cd8541c0572736c3c (patch)
treecbdc6a0031b4954092cd8a0cefe6fc5cb16a890f /generic
parent32fb8662953b599dd793aea06f5d2938ae4973ae (diff)
parent5ab653feb0f92621dfa72b70722477353ae22c75 (diff)
downloadtcl-3aa1601f2afddd655694ff5cd8541c0572736c3c.zip
tcl-3aa1601f2afddd655694ff5cd8541c0572736c3c.tar.gz
tcl-3aa1601f2afddd655694ff5cd8541c0572736c3c.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')
-rw-r--r--generic/tclCompCmds.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/generic/tclCompCmds.c b/generic/tclCompCmds.c
index 57a5370..18ff3dc 100644
--- a/generic/tclCompCmds.c
+++ b/generic/tclCompCmds.c
@@ -906,7 +906,7 @@ TclCompileDictForCmd(
* Compile the loop body itself. It should be stack-neutral.
*/
- SetLineInformation(4);
+ SetLineInformation(3);
CompileBody(envPtr, bodyTokenPtr, interp);
TclEmitOpcode( INST_POP, envPtr);
@@ -1112,6 +1112,7 @@ TclCompileDictUpdateCmd(
ExceptionRangeStarts(envPtr, range);
envPtr->currStackDepth++;
+ SetLineInformation(parsePtr->numWords - 1);
CompileBody(envPtr, bodyTokenPtr, interp);
envPtr->currStackDepth = savedStackDepth;
ExceptionRangeEnds(envPtr, range);