fix bad marking of attributed variables from trail.

This commit is contained in:
Vitor Santos Costa 2008-11-13 09:03:27 +00:00
parent 6920041189
commit 1c334ea198

View File

@ -1598,8 +1598,11 @@ mark_environments(CELL_PTR gc_ENV, OPREG size, CELL *pvbmap)
static void
mark_att_var(CELL *hp)
{
int relpos = ((CELL *)Yap_GlobalBase-hp)%3;
attvar_record *attv = (attvar_record *)(hp-relpos);
attvar_record *top = (attvar_record *)Yap_GlobalBase;
int relpos = top-(attvar_record *)hp;
attvar_record *attv = top-relpos;
if (attv != (attvar_record *)hp)
attv--;
mark_external_reference2(&attv->Done);
mark_external_reference2(&attv->Value);
mark_external_reference2(&attv->Atts);