diff options
Diffstat (limited to 'generic/tclCompCmds.c')
-rw-r--r-- | generic/tclCompCmds.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/generic/tclCompCmds.c b/generic/tclCompCmds.c index c94aeff..5ed7be0 100644 --- a/generic/tclCompCmds.c +++ b/generic/tclCompCmds.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompCmds.c,v 1.17 2001/12/10 15:44:34 msofer Exp $ + * RCS: @(#) $Id: tclCompCmds.c,v 1.18 2001/12/11 14:29:40 msofer Exp $ */ #include "tclInt.h" @@ -1808,7 +1808,14 @@ TclCompileLindexCmd(interp, parsePtr, envPtr) if ( numWords == 3 ) { TclEmitOpcode( INST_LIST_INDEX, envPtr ); } else { - TclEmitInstInt4( INST_LIST_INDEX_MULTI, numWords-2, envPtr ); + /* + * envPtr->currStackDepth has to be updated, as this instruction + * does not conform to the convention that its stack balance is + * (1-opnd): it is actually one less (-opnd). + */ + + TclEmitInstInt4( INST_LIST_INDEX_MULTI, numWords-2, envPtr ); + envPtr->currStackDepth--; } return TCL_OK; |