Subject: Stack depth calculation correction.

From: dkf <[email-masked]>
Date: Wed, 23 Oct 2013 08:33:40 +0000

---
 generic/tclCompCmdsGR.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/generic/tclCompCmdsGR.c b/generic/tclCompCmdsGR.c
index 2aaca31..a02f0a8 100644
--- a/generic/tclCompCmdsGR.c
+++ b/generic/tclCompCmdsGR.c
@@ -1616,6 +1616,7 @@ TclCompileLreplaceCmd(
 		Tcl_ObjPrintf("-errorcode {TCL OPERATION LREPLACE BADIDX}"));
 	TclStoreInt1AtPtr(CurrentOffset(envPtr) - offset,
 		envPtr->codeStart + offset + 1);
+	TclAdjustStackDepth(-1, envPtr);
     }
     TclEmitOpcode(		INST_DUP,			envPtr);
     TclEmitInstInt4(		INST_LIST_RANGE_IMM, 0,		envPtr);
@@ -1665,6 +1666,7 @@ TclCompileLreplaceCmd(
 		Tcl_ObjPrintf("-errorcode {TCL OPERATION LREPLACE BADIDX}"));
 	TclStoreInt1AtPtr(CurrentOffset(envPtr) - offset,
 		envPtr->codeStart + offset + 1);
+	TclAdjustStackDepth(-1, envPtr);
     }
     TclEmitOpcode(		INST_DUP,			envPtr);
     TclEmitInstInt4(		INST_LIST_RANGE_IMM, 0,		envPtr);
-- 
cgit v0.12