fix recordifnot bug with ground terms

git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@600 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
vsc 2002-09-18 21:28:19 +00:00
parent aa2f469784
commit d4b8acf1fd

View File

@ -1120,7 +1120,7 @@ check_if_wvars(DBRef p, unsigned int NOfCells, CELL *BTptr)
static int static int
scheckcells(int NOfCells, register CELL *m1, register CELL *m2, link_entry *lp, register CELL bp) scheckcells(int NOfCells, register CELL *m1, register CELL *m2, link_entry *lp, register CELL bp)
{ {
CELL base = Unsigned(m1 + 1); CELL base = Unsigned(m1);
link_entry *lp1; link_entry *lp1;
while (NOfCells-- > 0) { while (NOfCells-- > 0) {
@ -1168,7 +1168,7 @@ check_if_nvars(DBRef p, unsigned int NOfCells, CELL *BTptr)
return (p); return (p);
memptr = CellPtr(p->Contents); memptr = CellPtr(p->Contents);
#ifdef IDB_LINK_TABLE #ifdef IDB_LINK_TABLE
if (scheckcells(NOfCells, memptr, BTptr, LinkAr, Unsigned(p->Contents))) if (scheckcells(NOfCells, memptr, BTptr, LinkAr, Unsigned(p->Contents-1)))
#else #else
if (NOfCells == *memptr++ if (NOfCells == *memptr++
&& cmpclls(memptr, BTptr, NOfCells)) && cmpclls(memptr, BTptr, NOfCells))