fix P details when creating execution environment: we should save the old one

This commit is contained in:
Vítor Santos Costa
2013-09-08 22:24:09 +01:00
parent 4c148cc0d3
commit 6966d23195
4 changed files with 7 additions and 2 deletions

View File

@@ -2291,6 +2291,8 @@ X_API qid_t PL_open_query(module_t ctx, int flags, predicate_t p, term_t t0)
new->cp = CP;
new->p = P;
new->b = (CELL)(LCL0-(CELL*)B);
new->envp = (CELL)(LCL0-ENV);
new->asp = (CELL)(LCL0-ASP);
new->slots = CurSlot;
new->flags = 0;
LOCAL_execution = new;