fix bad argument processing in non-inlined arithmetic comparisons.
This commit is contained in:
parent
c8946e1e4e
commit
0e2d3e3a91
10
C/cmppreds.c
10
C/cmppreds.c
@ -681,35 +681,35 @@ a_eq(Term t1, Term t2)
|
||||
static Int
|
||||
a_dif(Term t1, Term t2)
|
||||
{
|
||||
int out = a_cmp(t1,t2);
|
||||
int out = a_cmp(Deref(t1),Deref(t2));
|
||||
return !ArithError && out != 0;
|
||||
}
|
||||
|
||||
static Int
|
||||
a_gt(Term t1, Term t2)
|
||||
{ /* A > B */
|
||||
int out = a_cmp(t1,t2);
|
||||
int out = a_cmp(Deref(t1),Deref(t2));
|
||||
return !ArithError && out > 0;
|
||||
}
|
||||
|
||||
static Int
|
||||
a_ge(Term t1, Term t2)
|
||||
{ /* A >= B */
|
||||
int out = a_cmp(t1,t2);
|
||||
int out = a_cmp(Deref(t1),Deref(t2));
|
||||
return !ArithError && out >= 0;
|
||||
}
|
||||
|
||||
static Int
|
||||
a_lt(Term t1, Term t2)
|
||||
{ /* A < B */
|
||||
int out = a_cmp(t1,t2);
|
||||
int out = a_cmp(Deref(t1),Deref(t2));
|
||||
return !ArithError && out < 0;
|
||||
}
|
||||
|
||||
static Int
|
||||
a_le(Term t1, Term t2)
|
||||
{ /* A <= B */
|
||||
int out = a_cmp(t1,t2);
|
||||
int out = a_cmp(Deref(t1),Deref(t2));
|
||||
return !ArithError && out <= 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user