FIX: initslots could destroy environment

This commit is contained in:
Vítor Santos Costa 2010-06-18 00:25:24 +01:00
parent 4a5a74929c
commit 0ccb607f19

View File

@ -1164,11 +1164,11 @@ Yap_execute_goal(Term t, int nargs, Term mod)
CP = saved_cp;
P = saved_p;
ASP = ENV;
Yap_StartSlots();
#ifdef DEPTH_LIMIT
DEPTH= ENV[E_DEPTH];
#endif
ENV = (CELL *)(ENV[E_E]);
Yap_StartSlots();
/* we have failed, and usually we would backtrack to this B,
trouble is, we may also have a delayed cut to do */
if (B != NULL)