fix overflow in SWI interface code.
This commit is contained in:
parent
ecf5ac655f
commit
3f6e56eb82
@ -843,6 +843,11 @@ X_API int PL_cons_functor_v(term_t d, functor_t f, term_t a0)
|
|||||||
X_API int PL_cons_list(term_t d, term_t h, term_t t)
|
X_API int PL_cons_list(term_t d, term_t h, term_t t)
|
||||||
{
|
{
|
||||||
CACHE_REGS
|
CACHE_REGS
|
||||||
|
if (Unsigned(H) > Unsigned(ASP)-CreepFlag) {
|
||||||
|
if (!do_gc(0)) {
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
}
|
||||||
Yap_PutInSlot(d,MkPairTerm(Yap_GetFromSlot(h PASS_REGS),Yap_GetFromSlot(t PASS_REGS)) PASS_REGS);
|
Yap_PutInSlot(d,MkPairTerm(Yap_GetFromSlot(h PASS_REGS),Yap_GetFromSlot(t PASS_REGS)) PASS_REGS);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user