From 0f06fd8c2fbb62744e435cb7ae9967e95ade6b2a Mon Sep 17 00:00:00 2001 From: chriseth Date: Thu, 25 Jun 2015 18:41:26 +0200 Subject: [PATCH] Fixed counter modification when appending assemblies. --- Assembly.cpp | 6 +++--- AssemblyItem.cpp | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Assembly.cpp b/Assembly.cpp index 34ee05966..c96b6f40d 100644 --- a/Assembly.cpp +++ b/Assembly.cpp @@ -41,7 +41,7 @@ void Assembly::append(Assembly const& _a) if (i.type() == Tag || i.type() == PushTag) i.setData(i.data() + m_usedTags); else if (i.type() == PushSub || i.type() == PushSubSize) - i.setData(i.data() + m_usedTags); + i.setData(i.data() + m_subs.size()); append(i); } m_deposit = newDeposit; @@ -136,10 +136,10 @@ ostream& Assembly::streamAsm(ostream& _out, string const& _prefix, StringMap con _out << " PUSH [tag" << dec << i.data() << "]"; break; case PushSub: - _out << " PUSH [$" << h256(i.data()).abridged() << "]"; + _out << " PUSH [$" << h256(i.data()).abridgedMiddle() << "]"; break; case PushSubSize: - _out << " PUSH #[$" << h256(i.data()).abridged() << "]"; + _out << " PUSH #[$" << h256(i.data()).abridgedMiddle() << "]"; break; case PushProgramSize: _out << " PUSHSIZE"; diff --git a/AssemblyItem.cpp b/AssemblyItem.cpp index a0c5e19a6..e005ece18 100644 --- a/AssemblyItem.cpp +++ b/AssemblyItem.cpp @@ -110,10 +110,10 @@ ostream& dev::eth::operator<<(ostream& _out, AssemblyItem const& _item) _out << " PushData " << hex << (unsigned)_item.data(); break; case PushSub: - _out << " PushSub " << hex << h256(_item.data()).abridged(); + _out << " PushSub " << hex << h256(_item.data()).abridgedMiddle(); break; case PushSubSize: - _out << " PushSubSize " << hex << h256(_item.data()).abridged(); + _out << " PushSubSize " << hex << h256(_item.data()).abridgedMiddle(); break; case PushProgramSize: _out << " PushProgramSize";