fix case where compiler would coredump on badly typed arguments to functor/3.

This commit is contained in:
Vítor Santos Costa 2008-12-28 11:00:38 +00:00
parent 5e09d8e1bd
commit 18d5fa12e4

View File

@ -1095,7 +1095,7 @@ c_bifun(Int Op, Term t1, Term t2, Term t3, Term Goal, int mod, compiler_struct *
RESET_VARIABLE(H+1);
H += 2;
c_eq(AbsPair(H-2),t3, cglobs);
} else if (i2 < 256) {
} else if (i2 < 256 && IsAtomTerm(t1)) {
*H++ = (CELL)Yap_MkFunctor(AtomOfTerm(t1),i2);
for (i=0; i < i2; i++) {
if (H >= (CELL *)cglobs->cint.freep0) {