fix bad error propagation in term comparison #53

This commit is contained in:
Costa Vitor 2009-05-22 18:44:05 -05:00
parent ec595374a6
commit 8fcc534a19
2 changed files with 4 additions and 1 deletions

View File

@ -11325,8 +11325,10 @@ Yap_absmi(int inp)
d0 = (CELL) (f) (d0,d1);
setregs();
}
if (PREG == FAILCODE) {
JMPNext();
}
if (!d0) {
if (PREG != FAILCODE)
PREG = PREG->u.plxxs.f;
JMPNext();
}

View File

@ -546,6 +546,7 @@ a_cmp(Term t1, Term t2)
return(int_cmp(IntegerOfTerm(t1)-IntegerOfTerm(t2)));
}
t1 = Yap_Eval(t1);
if (!t1) return FALSE;
if (IsIntegerTerm(t1)) {
Int i1 = IntegerOfTerm(t1);
t2 = Yap_Eval(t2);