From 18d5fa12e42e50b2209b9b92476a65916f1d41e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADtor=20Santos=20Costa?= Date: Sun, 28 Dec 2008 11:00:38 +0000 Subject: [PATCH] fix case where compiler would coredump on badly typed arguments to functor/3. --- C/compiler.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C/compiler.c b/C/compiler.c index 15fa1ba56..893f52e8b 100644 --- a/C/compiler.c +++ b/C/compiler.c @@ -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) {