From 76ed7f2b20637e3194a11113f284dc7b36a9725b Mon Sep 17 00:00:00 2001 From: Ali Mohammad Pur Date: Sat, 4 Dec 2021 17:59:20 +0330 Subject: [PATCH] LibWasm: Fix silly typo in f32 reinterpret validation --- Userland/Libraries/LibWasm/AbstractMachine/Validator.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Userland/Libraries/LibWasm/AbstractMachine/Validator.cpp b/Userland/Libraries/LibWasm/AbstractMachine/Validator.cpp index 6a5d6bd9b1..5d05032059 100644 --- a/Userland/Libraries/LibWasm/AbstractMachine/Validator.cpp +++ b/Userland/Libraries/LibWasm/AbstractMachine/Validator.cpp @@ -1626,11 +1626,11 @@ VALIDATE_INSTRUCTION(f64_reinterpret_i64) VALIDATE_INSTRUCTION(i32_reinterpret_f32) { - if (stack.is_empty() || !stack.last().is_of_kind(ValueType::I32)) + if (stack.is_empty() || !stack.last().is_of_kind(ValueType::F32)) return Errors::invalid_stack_state(); stack.take_last(); - stack.append(ValueType(ValueType::F32)); + stack.append(ValueType(ValueType::I32)); return {}; }