From de1fb3e2c56843c0d4adadde8451fdbde673c1eb Mon Sep 17 00:00:00 2001 From: Vitor Santos Costa Date: Sun, 17 May 2009 08:02:34 -0700 Subject: [PATCH] copy exception term early on to avoid dangling pointers. --- C/exec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C/exec.c b/C/exec.c index 82a869124..f773f3596 100644 --- a/C/exec.c +++ b/C/exec.c @@ -1491,7 +1491,7 @@ JumpToEnv(Term t) { CELL *env; choiceptr first_func = NULL, B0 = B; - if (!Yap_SetGlobalVal(AtomHandleThrow,t)) + if (!(t = Yap_SetGlobalVal(AtomHandleThrow,t))) return FALSE; do { /* find the first choicepoint that may be a catch */