From e5a62a884321df193921801ecf12b740ee707e4e Mon Sep 17 00:00:00 2001 From: Vitor Santos Costa Date: Wed, 31 Aug 2011 13:56:32 -0700 Subject: [PATCH] CloseSlots should work even if the stack doesn't have a slot on top. --- H/Yap.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/H/Yap.h b/H/Yap.h index 11d19ed25..74fa8d810 100644 --- a/H/Yap.h +++ b/H/Yap.h @@ -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);