diff --git a/lib/evmone/eof.cpp b/lib/evmone/eof.cpp index a5e2f343cd..ef090329ea 100644 --- a/lib/evmone/eof.cpp +++ b/lib/evmone/eof.cpp @@ -773,7 +773,6 @@ std::variant validate_header( for (const auto code_size : code_sizes) { - assert(offset <= std::numeric_limits::max()); code_offsets.emplace_back(static_cast(offset)); offset += code_size; } @@ -785,6 +784,8 @@ std::variant validate_header( container_offsets.emplace_back(static_cast(offset)); offset += container_size; } + + assert(offset <= std::numeric_limits::max()); const auto data_offset = static_cast(offset); return EOF1Header{