From fe5fda93fc20f13b515e21fb93aee8e5d8271375 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Sat, 3 Dec 2022 00:38:30 +0100 Subject: [PATCH] Remove typecast (size is determined by output) --- libevmasm/Assembly.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libevmasm/Assembly.cpp b/libevmasm/Assembly.cpp index ec219d8b9..f1c239574 100644 --- a/libevmasm/Assembly.cpp +++ b/libevmasm/Assembly.cpp @@ -705,7 +705,7 @@ LinkerObject const& Assembly::assemble(bool eof) const if (eof) { assertThrow(codeLength > 0 && codeLength <= 0xffff, AssemblyException, "Invalid code section size."); - toBigEndian(uint16_t(codeLength), eofCodeLength); + toBigEndian(codeLength, eofCodeLength); } auto const dataStart = ret.bytecode.size(); @@ -778,7 +778,7 @@ LinkerObject const& Assembly::assemble(bool eof) const if (eof) { assertThrow(/*dataLength >= 0 && */ dataLength <= 0xffff, AssemblyException, "Invalid data section size."); - toBigEndian(uint16_t(dataLength), eofDataLength); + toBigEndian(dataLength, eofDataLength); } return ret;