summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2013-09-19 14:49:28 (GMT)
committerdgp <dgp@users.sourceforge.net>2013-09-19 14:49:28 (GMT)
commitb6c1b41e104b590889abc40a5b8cab1436d2e52c (patch)
treeb9be15dbb81dfa9b9fa1702e1cfbbc9131e8c50e /generic
parentbd33f7aed8365be64ec2ffde4950fac52695a0e6 (diff)
parent08f3edbacbd40f9f76fb9e002b49516a5ffc3c62 (diff)
downloadtcl-b6c1b41e104b590889abc40a5b8cab1436d2e52c.zip
tcl-b6c1b41e104b590889abc40a5b8cab1436d2e52c.tar.gz
tcl-b6c1b41e104b590889abc40a5b8cab1436d2e52c.tar.bz2
Line numbers wrong in compiled [dict get].
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 4c4d458..8f72367 100644
--- a/generic/tclCompCmds.c
+++ b/generic/tclCompCmds.c
@@ -965,7 +965,7 @@ TclCompileDictGetCmd(
CompileEnv *envPtr) /* Holds resulting instructions. */
{
Tcl_Token *tokenPtr;
- int numWords, i;
+ int i;
DefineLineInformation; /* TIP #280 */
/*
@@ -978,17 +978,16 @@ TclCompileDictGetCmd(
return TCL_ERROR;
}
tokenPtr = TokenAfter(parsePtr->tokenPtr);
- numWords = parsePtr->numWords-1;
/*
* Only compile this because we need INST_DICT_GET anyway.
*/
- for (i=0 ; i<numWords ; i++) {
+ for (i=1 ; i<parsePtr->numWords ; i++) {
CompileWord(envPtr, tokenPtr, interp, i);
tokenPtr = TokenAfter(tokenPtr);
}
- TclEmitInstInt4(INST_DICT_GET, numWords-1, envPtr);
+ TclEmitInstInt4(INST_DICT_GET, parsePtr->numWords-2, envPtr);
TclAdjustStackDepth(-1, envPtr);
return TCL_OK;
}