summaryrefslogtreecommitdiffstats
path: root/generic/tclListObj.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2011-05-11 20:42:14 (GMT)
committerdgp <dgp@users.sourceforge.net>2011-05-11 20:42:14 (GMT)
commit6cb89316082741c7eb0469690fb160f21ade4c87 (patch)
treef44c37908b7277f4aeba25e6091e5c5b9cc5f44d /generic/tclListObj.c
parentd3f70de8a257035276be5a2d6af9bc5c21f5666c (diff)
downloadtcl-6cb89316082741c7eb0469690fb160f21ade4c87.zip
tcl-6cb89316082741c7eb0469690fb160f21ade4c87.tar.gz
tcl-6cb89316082741c7eb0469690fb160f21ade4c87.tar.bz2
Oops!
Diffstat (limited to 'generic/tclListObj.c')
-rw-r--r--generic/tclListObj.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/generic/tclListObj.c b/generic/tclListObj.c
index b623272..f1daf19 100644
--- a/generic/tclListObj.c
+++ b/generic/tclListObj.c
@@ -908,7 +908,7 @@ Tcl_ListObjReplace(
listRepPtr = AttemptNewList(NULL, newMax, NULL);
if (listRepPtr == NULL) {
unsigned int limit = LIST_MAX - numRequired;
- unsigned int extra = numRequired - listRepPtr->elemCount
+ unsigned int extra = numRequired - numElems
+ TCL_GROWTH_MIN_ALLOC/sizeof(Tcl_Obj *);
int growth = (int) ((extra > limit) ? limit : extra);