From 1e35526eb6a7c5af074170f6291491d3cb0bd6ba Mon Sep 17 00:00:00 2001 From: chriseth Date: Thu, 24 Nov 2016 12:32:42 +0100 Subject: Fix tests. --- libevmasm/Assembly.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'libevmasm') diff --git a/libevmasm/Assembly.cpp b/libevmasm/Assembly.cpp index fab63840..a9ca24dc 100644 --- a/libevmasm/Assembly.cpp +++ b/libevmasm/Assembly.cpp @@ -525,8 +525,9 @@ LinkerObject const& Assembly::assemble() const } } - // Append a STOP just to be sure. - ret.bytecode.push_back(0); + if (!m_subs.empty() || !m_data.empty() || !m_auxiliaryData.empty()) + // Append a STOP just to be sure. + ret.bytecode.push_back(0); for (size_t i = 0; i < m_subs.size(); ++i) { -- cgit