CloseSlots should work even if the stack doesn't have a slot on top.

This commit is contained in:
Vitor Santos Costa 2011-08-31 13:56:32 -07:00
parent dfa10d1c23
commit e5a62a8843

View File

@ -1377,6 +1377,8 @@ Yap_StartSlots( USES_REGS1 ) {
static inline void
Yap_CloseSlots( USES_REGS1 ) {
Int old_slots;
if (CurSlot < LCL0-ASP)
return;
old_slots = IntOfTerm(ASP[0]);
ASP += (old_slots+1);
CurSlot = IntOfTerm(*ASP);