fix bad size in grow stack

This commit is contained in:
Vitor Santos Costa 2008-11-13 09:02:33 +00:00
parent 297ea16dcb
commit 6920041189
1 changed files with 1 additions and 3 deletions

View File

@ -721,6 +721,7 @@ static_growglobal(long size, CELL **ptr, CELL *hsplit)
int do_grow = TRUE;
CurrentDelayTop = (CELL *)omax;
size0 = size;
if (hsplit) {
/* just a little bit of sanity checking */
if (hsplit < (CELL*)omax ||
@ -734,9 +735,6 @@ static_growglobal(long size, CELL **ptr, CELL *hsplit)
do_grow = FALSE;
}
}
size0 = size;
if (size < ((char *)H0-omax)/8)
size = ((char *)H0-omax)/8;
if (do_grow) {
if (size < YAP_ALLOC_SIZE)
size = YAP_ALLOC_SIZE;