summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2013-09-19 13:13:00 (GMT)
committerdgp <dgp@users.sourceforge.net>2013-09-19 13:13:00 (GMT)
commit9d75751f2147019420220fdcf98b190c771c4006 (patch)
tree8b1952594bfe664131235a2cdd9ad38ffe3bee56 /generic
parentac04e17db79d9572aab9d187570f96dc55cc2f18 (diff)
parent635d8c961aa06ec17403483a0ff3c0a3d524f3d1 (diff)
downloadtcl-9d75751f2147019420220fdcf98b190c771c4006.zip
tcl-9d75751f2147019420220fdcf98b190c771c4006.tar.gz
tcl-9d75751f2147019420220fdcf98b190c771c4006.tar.bz2
Line numbers wrong in compiled [dict set].
Diffstat (limited to 'generic')
-rw-r--r--generic/tclCompCmds.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/generic/tclCompCmds.c b/generic/tclCompCmds.c
index 572331b..e26f29c 100644
--- a/generic/tclCompCmds.c
+++ b/generic/tclCompCmds.c
@@ -839,7 +839,7 @@ TclCompileDictSetCmd(
CompileEnv *envPtr) /* Holds resulting instructions. */
{
Tcl_Token *tokenPtr;
- int numWords, i, dictVarIndex;
+ int i, dictVarIndex;
DefineLineInformation; /* TIP #280 */
Tcl_Token *varTokenPtr;
@@ -868,8 +868,7 @@ TclCompileDictSetCmd(
*/
tokenPtr = TokenAfter(varTokenPtr);
- numWords = parsePtr->numWords-1;
- for (i=1 ; i<numWords ; i++) {
+ for (i=2 ; i< parsePtr->numWords ; i++) {
CompileWord(envPtr, tokenPtr, interp, i);
tokenPtr = TokenAfter(tokenPtr);
}
@@ -878,7 +877,7 @@ TclCompileDictSetCmd(
* Now emit the instruction to do the dict manipulation.
*/
- TclEmitInstInt4( INST_DICT_SET, numWords-2, envPtr);
+ TclEmitInstInt4( INST_DICT_SET, parsePtr->numWords-3, envPtr);
TclEmitInt4( dictVarIndex, envPtr);
TclAdjustStackDepth(-1, envPtr);
return TCL_OK;