From abc574289f40b4240a4a54d0bacd5d7d8ede2c85 Mon Sep 17 00:00:00 2001 From: "Wolfgang (Blub) Bumiller" Date: Tue, 14 Aug 2012 16:48:20 +0200 Subject: [PATCH] fix wrong count on IF/IFNOT jumps --- ir.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ir.c b/ir.c index 266651d..9deae24 100644 --- a/ir.c +++ b/ir.c @@ -2342,13 +2342,13 @@ tailcall: if (ontrue->generated) { stmt.opcode = INSTR_IF; - stmt.o2.s1 = (ontrue->code_start-1) - code_statements_elements; + stmt.o2.s1 = (ontrue->code_start) - code_statements_elements; if (code_statements_add(stmt) < 0) return false; } if (onfalse->generated) { stmt.opcode = INSTR_IFNOT; - stmt.o2.s1 = (onfalse->code_start-1) - code_statements_elements; + stmt.o2.s1 = (onfalse->code_start) - code_statements_elements; if (code_statements_add(stmt) < 0) return false; } -- 2.39.2