From 0c18450c4f5d95a38bbff7e81d7857bdb82e1e83 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sun, 3 Mar 2024 09:04:30 +0100 Subject: [PATCH] LibJS/Bytecode: Fix bad serialization of Postfix{Increment,Decrement} We were serializing the dst operand twice in both instructions. --- Userland/Libraries/LibJS/Bytecode/Interpreter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Userland/Libraries/LibJS/Bytecode/Interpreter.cpp b/Userland/Libraries/LibJS/Bytecode/Interpreter.cpp index 1ba9065af3..d0fc87c517 100644 --- a/Userland/Libraries/LibJS/Bytecode/Interpreter.cpp +++ b/Userland/Libraries/LibJS/Bytecode/Interpreter.cpp @@ -2000,7 +2000,7 @@ ByteString PostfixIncrement::to_byte_string_impl(Bytecode::Executable const& exe { return ByteString::formatted("PostfixIncrement {}, {}", format_operand("dst"sv, m_dst, executable), - format_operand("src"sv, m_dst, executable)); + format_operand("src"sv, m_src, executable)); } ByteString Decrement::to_byte_string_impl(Bytecode::Executable const& executable) const @@ -2012,7 +2012,7 @@ ByteString PostfixDecrement::to_byte_string_impl(Bytecode::Executable const& exe { return ByteString::formatted("PostfixDecrement {}, {}", format_operand("dst"sv, m_dst, executable), - format_operand("src"sv, m_dst, executable)); + format_operand("src"sv, m_src, executable)); } ByteString Throw::to_byte_string_impl(Bytecode::Executable const& executable) const