check overflow correctly.
This commit is contained in:
parent
c4819d8ab2
commit
3f5117d020
@ -233,7 +233,7 @@ Yap_GetFromArena(Term *arenap, UInt cells, UInt arity)
|
||||
H += cells;
|
||||
return base;
|
||||
}
|
||||
if (base+cells > ASP-1024) {
|
||||
if (base+cells > max-1024) {
|
||||
if (!GrowArena(arena, max, old_sz, old_sz+sizeof(CELL)*1024, arity))
|
||||
return NULL;
|
||||
goto restart;
|
||||
|
Reference in New Issue
Block a user