diff options
author | dgp <dgp@users.sourceforge.net> | 2013-09-19 13:06:06 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2013-09-19 13:06:06 (GMT) |
commit | 1b0845930c4443b53093d14ad56bf2d932ec40b2 (patch) | |
tree | 5f3f379cfbda273dc21e1071c0c8e64b82f096c5 /generic/tclCompCmds.c | |
parent | ad07565ec073b413895d29fa06f19a63b39aa83e (diff) | |
download | tcl-1b0845930c4443b53093d14ad56bf2d932ec40b2.zip tcl-1b0845930c4443b53093d14ad56bf2d932ec40b2.tar.gz tcl-1b0845930c4443b53093d14ad56bf2d932ec40b2.tar.bz2 |
Line numbers wrong in compiled [dict set].
Diffstat (limited to 'generic/tclCompCmds.c')
-rw-r--r-- | generic/tclCompCmds.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/generic/tclCompCmds.c b/generic/tclCompCmds.c index 2013568..260bd28 100644 --- a/generic/tclCompCmds.c +++ b/generic/tclCompCmds.c @@ -683,11 +683,10 @@ TclCompileDictSetCmd( CompileEnv *envPtr) /* Holds resulting instructions. */ { Tcl_Token *tokenPtr; - int numWords, i; Proc *procPtr = envPtr->procPtr; DefineLineInformation; /* TIP #280 */ Tcl_Token *varTokenPtr; - int dictVarIndex, nameChars; + int i, dictVarIndex, nameChars; const char *name; /* @@ -720,8 +719,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); } @@ -730,7 +728,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); return TCL_OK; } |