From 92d2152aa7969136097e3948a90ae08a5d0825e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADtor=20Santos=20Costa?= Date: Fri, 11 Mar 2011 19:47:58 +0000 Subject: [PATCH] fix bad lookout for handler choicepoint. --- C/exec.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/C/exec.c b/C/exec.c index 0860d3c1b..725cc39c0 100644 --- a/C/exec.c +++ b/C/exec.c @@ -1468,8 +1468,8 @@ static int is_cleanup_cp(choiceptr cp_b) static Int JumpToEnv(Term t USES_REGS) { - yamop *pos = NEXTOP(PredDollarCatch->cs.p_code.TrueCodeOfPred,l), - *catchpos = NEXTOP(PredHandleThrow->cs.p_code.TrueCodeOfPred,l); + yamop *pos = NEXTOP(PredDollarCatch->cs.p_code.TrueCodeOfPred,Otapl), + *catchpos = NEXTOP(PredHandleThrow->cs.p_code.TrueCodeOfPred,Otapl); CELL *env, *env1; choiceptr handler, previous = NULL; @@ -1559,7 +1559,7 @@ JumpToEnv(Term t USES_REGS) { } handler->cp_cp = (yamop *)env[E_CP]; handler->cp_env = (CELL *)env[E_E]; - handler->cp_ap = NEXTOP(PredHandleThrow->CodeOfPred,l); + handler->cp_ap = NEXTOP(PredHandleThrow->CodeOfPred,Otapl); /* can recover Heap thanks to copy term :-( */ /* B->cp_h = H; */ /* I could backtrack here, but it is easier to leave the unwinding