From d05e5dbdcf0868174d48b5ab60e7b35285327f80 Mon Sep 17 00:00:00 2001 From: Ali Mohammad Pur Date: Tue, 18 May 2021 01:38:34 +0430 Subject: [PATCH] LibWasm: Drop the correct number of frames Prior to this commit, we would be dropping an extra frame. --- Userland/Libraries/LibWasm/AbstractMachine/Interpreter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibWasm/AbstractMachine/Interpreter.cpp b/Userland/Libraries/LibWasm/AbstractMachine/Interpreter.cpp index 68312a5f3c..05f2d68917 100644 --- a/Userland/Libraries/LibWasm/AbstractMachine/Interpreter.cpp +++ b/Userland/Libraries/LibWasm/AbstractMachine/Interpreter.cpp @@ -59,7 +59,7 @@ void Interpreter::branch_to_label(Configuration& configuration, LabelIndex index for (; !configuration.stack().is_empty();) { auto& entry = configuration.stack().peek(); if (entry.has>()) { - if (drop_count-- == 0) + if (--drop_count == 0) break; } configuration.stack().pop();