From d4b8acf1fd018098a8760e9cf5d3a9ab60723b8b Mon Sep 17 00:00:00 2001 From: vsc Date: Wed, 18 Sep 2002 21:28:19 +0000 Subject: [PATCH] fix recordifnot bug with ground terms git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@600 b08c6af1-5177-4d33-ba66-4b1c6b8b522a --- C/dbase.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/C/dbase.c b/C/dbase.c index 1cf3a70cb..99b2d6443 100644 --- a/C/dbase.c +++ b/C/dbase.c @@ -1120,7 +1120,7 @@ check_if_wvars(DBRef p, unsigned int NOfCells, CELL *BTptr) static int 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; while (NOfCells-- > 0) { @@ -1168,7 +1168,7 @@ check_if_nvars(DBRef p, unsigned int NOfCells, CELL *BTptr) return (p); memptr = CellPtr(p->Contents); #ifdef IDB_LINK_TABLE - if (scheckcells(NOfCells, memptr, BTptr, LinkAr, Unsigned(p->Contents))) + if (scheckcells(NOfCells, memptr, BTptr, LinkAr, Unsigned(p->Contents-1))) #else if (NOfCells == *memptr++ && cmpclls(memptr, BTptr, NOfCells))