fix bad handle recovery properly.

This commit is contained in:
Vitor Santos Costa 2014-05-15 01:11:26 +01:00
parent 7c8e2bbd16
commit 0aa91d7c00
2 changed files with 662 additions and 956 deletions

1616
C/write.c

File diff suppressed because it is too large Load Diff

View File

@ -146,7 +146,7 @@ Yap_RecoverSlots(int n, Int topSlot USES_REGS)
if (ASP+1 != LCL0+topSlot)
return FALSE;
ASP += n;
ASP[old_slots+(n-old_slots+1)] = ASP[0] = MkIntTerm(old_slots-n);
ASP[old_slots+(n-1)] = ASP[0] = MkIntTerm(old_slots-n);
return TRUE;
}