From 61973a2be6cd94b21a85272d092bbe5fb532ce66 Mon Sep 17 00:00:00 2001 From: Vitor Santos Costa Date: Sat, 9 May 2009 23:40:17 -0400 Subject: [PATCH] be careful: error handling may have changed PC in call_c_with_fail! --- C/absmi.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/C/absmi.c b/C/absmi.c index 1a03e6cff..35ad9115c 100644 --- a/C/absmi.c +++ b/C/absmi.c @@ -7598,10 +7598,13 @@ Yap_absmi(int inp) SREG = (CELL *)((f)()); setregs(); } - if (!SREG) - PREG = PREG->u.slp.l; - else + if (!SREG) { + /* be careful about error handling */ + if (PREG != FAILCODE) + PREG = PREG->u.slp.l; + } else { PREG = NEXTOP(PREG, slp); + } CACHE_A1(); JMPNext(); ENDBOp();