CloseSlots should work even if the stack doesn't have a slot on top.
This commit is contained in:
parent
dfa10d1c23
commit
e5a62a8843
2
H/Yap.h
2
H/Yap.h
@ -1377,6 +1377,8 @@ Yap_StartSlots( USES_REGS1 ) {
|
|||||||
static inline void
|
static inline void
|
||||||
Yap_CloseSlots( USES_REGS1 ) {
|
Yap_CloseSlots( USES_REGS1 ) {
|
||||||
Int old_slots;
|
Int old_slots;
|
||||||
|
if (CurSlot < LCL0-ASP)
|
||||||
|
return;
|
||||||
old_slots = IntOfTerm(ASP[0]);
|
old_slots = IntOfTerm(ASP[0]);
|
||||||
ASP += (old_slots+1);
|
ASP += (old_slots+1);
|
||||||
CurSlot = IntOfTerm(*ASP);
|
CurSlot = IntOfTerm(*ASP);
|
||||||
|
Reference in New Issue
Block a user