diff options
author | dgp <dgp@users.sourceforge.net> | 2013-09-19 17:01:58 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2013-09-19 17:01:58 (GMT) |
commit | b290b21a4427ac5d1584ad6fcf61e4934f1bf505 (patch) | |
tree | cd9ee01eab124e27a9b77d30fcac307790983fae /generic/tclCompCmds.c | |
parent | 34f5e7a008848bf85a6a5bf4d838aa3d8d21cd07 (diff) | |
download | tcl-b290b21a4427ac5d1584ad6fcf61e4934f1bf505.zip tcl-b290b21a4427ac5d1584ad6fcf61e4934f1bf505.tar.gz tcl-b290b21a4427ac5d1584ad6fcf61e4934f1bf505.tar.bz2 |
Line numbers wrong in compiled [dict exists].
Diffstat (limited to 'generic/tclCompCmds.c')
-rw-r--r-- | generic/tclCompCmds.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/generic/tclCompCmds.c b/generic/tclCompCmds.c index 9829b9c..64c110d 100644 --- a/generic/tclCompCmds.c +++ b/generic/tclCompCmds.c @@ -1002,7 +1002,7 @@ TclCompileDictExistsCmd( CompileEnv *envPtr) /* Holds resulting instructions. */ { Tcl_Token *tokenPtr; - int numWords, i; + int i; DefineLineInformation; /* TIP #280 */ /* @@ -1015,17 +1015,16 @@ TclCompileDictExistsCmd( return TCL_ERROR; } tokenPtr = TokenAfter(parsePtr->tokenPtr); - numWords = parsePtr->numWords-1; /* * Now we do the code generation. */ - for (i=0 ; i<numWords ; i++) { + for (i=1 ; i<parsePtr->numWords ; i++) { CompileWord(envPtr, tokenPtr, interp, i); tokenPtr = TokenAfter(tokenPtr); } - TclEmitInstInt4(INST_DICT_EXISTS, numWords-1, envPtr); + TclEmitInstInt4(INST_DICT_EXISTS, parsePtr->numWords-2, envPtr); TclAdjustStackDepth(-1, envPtr); return TCL_OK; } |