fix saving of source of static clauses.
This commit is contained in:
parent
26e3f2cea0
commit
1cd3777a45
14
H/rheap.h
14
H/rheap.h
@ -547,10 +547,16 @@ RestoreStaticClause(StaticClause *cl USES_REGS)
|
||||
* clause for this predicate or not
|
||||
*/
|
||||
{
|
||||
if (cl->ClFlags & FactMask) {
|
||||
cl->usc.ClPred = PtoPredAdjust(cl->usc.ClPred);
|
||||
} else {
|
||||
cl->usc.ClSource = DBTermAdjust(cl->usc.ClSource);
|
||||
if (cl->usc.ClSource) {
|
||||
char *x = (char *)DBTermAdjust(cl->usc.ClSource);
|
||||
char *base = (char *)cl;
|
||||
|
||||
if (x < base || x > base+cl->ClSize) {
|
||||
cl->usc.ClPred = PtoPredAdjust(cl->usc.ClPred);
|
||||
} else {
|
||||
cl->usc.ClSource = DBTermAdjust(cl->usc.ClSource);
|
||||
RestoreDBTerm(cl->usc.ClSource, TRUE PASS_REGS);
|
||||
}
|
||||
}
|
||||
if (cl->ClNext) {
|
||||
cl->ClNext = PtoStCAdjust(cl->ClNext);
|
||||
|
Reference in New Issue
Block a user