summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
Diffstat (limited to 'generic')
-rw-r--r--generic/tclExecute.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/generic/tclExecute.c b/generic/tclExecute.c
index 0aee386..0965d48 100644
--- a/generic/tclExecute.c
+++ b/generic/tclExecute.c
@@ -14,7 +14,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclExecute.c,v 1.388 2008/07/29 05:30:26 msofer Exp $
+ * RCS: @(#) $Id: tclExecute.c,v 1.389 2008/07/29 13:45:17 msofer Exp $
*/
#include "tclInt.h"
@@ -973,6 +973,7 @@ GrowEvaluationStack(
int newBytes, newElems, currElems;
int needed = growth - (esPtr->endPtr - esPtr->tosPtr);
Tcl_Obj **markerPtr = esPtr->markerPtr, **memStart;
+ int moveWords = 0;
if (move) {
if (!markerPtr) {
@@ -1007,9 +1008,9 @@ GrowEvaluationStack(
*/
if (move) {
- move = esPtr->tosPtr - MEMSTART(markerPtr) + 1;
+ moveWords = esPtr->tosPtr - MEMSTART(markerPtr) + 1;
}
- needed = growth + move + WALLOCALIGN - 1;
+ needed = growth + moveWords + WALLOCALIGN - 1;
/*
* Check if there is enough room in the next stack (if there is one, it
@@ -1069,8 +1070,8 @@ GrowEvaluationStack(
esPtr->tosPtr = memStart - 1;
if (move) {
- memcpy(memStart, MEMSTART(markerPtr), move*sizeof(Tcl_Obj *));
- esPtr->tosPtr += move;
+ memcpy(memStart, MEMSTART(markerPtr), moveWords*sizeof(Tcl_Obj *));
+ esPtr->tosPtr += moveWords;
oldPtr->markerPtr = (Tcl_Obj **) *markerPtr;
oldPtr->tosPtr = markerPtr-1;
}