From aadbb136f5cb6f884dd15f7f556647257afa1de5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADtor=20Santos=20Costa?= Date: Tue, 4 May 2010 14:53:34 +0100 Subject: [PATCH] make sure we always look for slots if called from user code. oops beautifications. --- C/c_interface.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/C/c_interface.c b/C/c_interface.c index 63b5490e8..589091e6a 100644 --- a/C/c_interface.c +++ b/C/c_interface.c @@ -1019,6 +1019,10 @@ YAP_cut_up(void) } } #endif /* CUT_C */ + /* This is complicated: make sure we can restore the ASP + pointer back to where cut_up called it. Slots depend on it. */ + if (ENV > B->cp_env) + ASP = B->cp_env; #ifdef YAPOR { choiceptr cut_pt; @@ -1033,7 +1037,6 @@ YAP_cut_up(void) B = B->cp_b; /* cut_fail */ #endif HB = B->cp_h; /* cut_fail */ - RECOVER_B(); }