From 025b3349e4cfe0250eb8c5e7015a9baae36d9190 Mon Sep 17 00:00:00 2001 From: Ali Mohammad Pur Date: Fri, 14 May 2021 21:14:31 +0430 Subject: [PATCH] LibWasm: Make structured_end() jump to the instruction after itself --- Userland/Libraries/LibWasm/Parser/Parser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibWasm/Parser/Parser.cpp b/Userland/Libraries/LibWasm/Parser/Parser.cpp index 81226e065d..227d9155bf 100644 --- a/Userland/Libraries/LibWasm/Parser/Parser.cpp +++ b/Userland/Libraries/LibWasm/Parser/Parser.cpp @@ -303,7 +303,7 @@ ParseResult> Instruction::parse(InputStream& stream, Instruc result.value().values.append(Instruction { Instructions::structured_end }); // Transform op(..., instr*) -> op(...) instr* op(end(ip)) - result.value().values.prepend(Instruction { opcode, StructuredInstructionArgs { BlockType { block_type.release_value() }, ip, {} } }); + result.value().values.prepend(Instruction { opcode, StructuredInstructionArgs { BlockType { block_type.release_value() }, ++ip, {} } }); return result.release_value().values; }