From c66cedbdccce431b9b9b42fb1a7aec81a8c64dfe Mon Sep 17 00:00:00 2001 From: Eduardo Bart Date: Sun, 23 Aug 2020 20:44:50 -0300 Subject: Fix issue #27 --- lpcode.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lpcode.c b/lpcode.c index a2d08f7..78c6566 100644 --- a/lpcode.c +++ b/lpcode.c @@ -535,16 +535,18 @@ static int addoffsetinst (CompileState *compst, Opcode op) { /* labeled failure */ static void codethrow (CompileState *compst, TTree *throw) { - int recov, aux; + int recov, aux, n; if (throw->u.ps != 0) { recov = addoffsetinst(compst, IThrowRec); assert(sib1(sib2(throw))->tag == TXInfo); + n = sib1(sib2(throw))->u.n; } else { recov = addinstruction(compst, IThrow, 0); + n = -1; } aux = nextinstruction(compst); getinstr(compst, aux).i.key = throw->key; /* next instruction keeps only rule name */ - getinstr(compst, recov).i.key = sib1(sib2(throw))->u.n; /* rule number */ + getinstr(compst, recov).i.key = n; /* rule number */ } /* labeled failure */ -- cgit v1.2.3-55-g6feb