aboutsummaryrefslogtreecommitdiffstats
path: root/libevmasm/Assembly.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libevmasm/Assembly.cpp')
-rw-r--r--libevmasm/Assembly.cpp5
1 files changed, 3 insertions, 2 deletions
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)
{