diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2013-01-03 14:07:24 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2013-01-03 14:07:24 (GMT) |
commit | 48d8cf61b7fd0af160956618fdf9e4cbccebf078 (patch) | |
tree | 54dad526f36acf29f43fabc0987a1a640026950d /generic/tclCompCmds.c | |
parent | c164d719c23ebe8d20d8420dc2345163a36878eb (diff) | |
parent | 6470859885f92e276993f88322b090eca3cb24f2 (diff) | |
download | tcl-48d8cf61b7fd0af160956618fdf9e4cbccebf078.zip tcl-48d8cf61b7fd0af160956618fdf9e4cbccebf078.tar.gz tcl-48d8cf61b7fd0af160956618fdf9e4cbccebf078.tar.bz2 |
merge main dev branch
Diffstat (limited to 'generic/tclCompCmds.c')
-rw-r--r-- | generic/tclCompCmds.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/generic/tclCompCmds.c b/generic/tclCompCmds.c index 917fd20..67f92b0 100644 --- a/generic/tclCompCmds.c +++ b/generic/tclCompCmds.c @@ -5791,7 +5791,7 @@ TclCompileVariableCmd( */ valueTokenPtr = parsePtr->tokenPtr; - for (i=2; i<=numWords; i+=2) { + for (i=1; i<numWords; i+=2) { varTokenPtr = TokenAfter(valueTokenPtr); valueTokenPtr = TokenAfter(varTokenPtr); @@ -5801,15 +5801,15 @@ TclCompileVariableCmd( return TCL_ERROR; } - CompileWord(envPtr, varTokenPtr, interp, 1); + CompileWord(envPtr, varTokenPtr, interp, i); TclEmitInstInt4( INST_VARIABLE, localIndex, envPtr); - if (i != numWords) { + if (i+1 < numWords) { /* * A value has been given: set the variable, pop the value */ - CompileWord(envPtr, valueTokenPtr, interp, 1); + CompileWord(envPtr, valueTokenPtr, interp, i+1); Emit14Inst( INST_STORE_SCALAR, localIndex, envPtr); TclEmitOpcode( INST_POP, envPtr); } |