summaryrefslogtreecommitdiffstats
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)
commit3495bd2531b93a17421d6dc087527ef5fa111118 (patch)
treef44c37908b7277f4aeba25e6091e5c5b9cc5f44d
parentb13a7c7f7e11cbd428004eef3a32e9f059af3183 (diff)
downloadtcl-3495bd2531b93a17421d6dc087527ef5fa111118.zip
tcl-3495bd2531b93a17421d6dc087527ef5fa111118.tar.gz
tcl-3495bd2531b93a17421d6dc087527ef5fa111118.tar.bz2
Oops!
-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);