From e5e02dab917a82ab701534f8582911917af331a4 Mon Sep 17 00:00:00 2001 From: Daniel Kirchner Date: Wed, 21 Dec 2022 16:59:06 +0100 Subject: [PATCH] f --- libevmasm/Assembly.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libevmasm/Assembly.cpp b/libevmasm/Assembly.cpp index 46fd40889..80f4bfe5b 100644 --- a/libevmasm/Assembly.cpp +++ b/libevmasm/Assembly.cpp @@ -552,7 +552,7 @@ LinkerObject const& Assembly::assemble() const ); assertThrow(!m_codeSections.empty(), AssemblyException, "Expected at least one code section."); - assertThrow(eof || m_codeSections.size() > 1, AssemblyException, "Expected exactly one code section in non-EOF code."); + assertThrow(eof || m_codeSections.size() == 1, AssemblyException, "Expected exactly one code section in non-EOF code."); assertThrow( m_codeSections.front().inputs == 0 && m_codeSections.front().outputs == 0, AssemblyException, "Expected the first code section to have zero inputs and outputs." @@ -858,8 +858,8 @@ LinkerObject const& Assembly::assemble() const assertThrow(m_eofVersion.has_value(), AssemblyException, "Relative jump outside EOF"); assertThrow(subId == numeric_limits::max(), AssemblyException, "Relative jump to sub"); assertThrow( - static_cast(pos) - static_cast(bytecodeOffset + 2u) < 0x7FFF && - static_cast(pos) - static_cast(bytecodeOffset + 2u) >= -0x8000, + static_cast(pos) - static_cast(bytecodeOffset + 2u) < 0x7FFF && + static_cast(pos) - static_cast(bytecodeOffset + 2u) >= -0x8000, AssemblyException, "Relative jump too far" );