From 7127f2fdfdc1bfb8efd9a1212725e36c3c42ad9a Mon Sep 17 00:00:00 2001 From: chriseth Date: Tue, 10 Jan 2017 16:35:10 +0100 Subject: Fix debug output. --- libevmasm/SimplificationRules.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'libevmasm/SimplificationRules.cpp') diff --git a/libevmasm/SimplificationRules.cpp b/libevmasm/SimplificationRules.cpp index bb950400..0e95b4bb 100644 --- a/libevmasm/SimplificationRules.cpp +++ b/libevmasm/SimplificationRules.cpp @@ -283,13 +283,19 @@ string Pattern::toString() const s << instructionInfo(m_instruction).name; break; case Push: - s << "PUSH " << hex << data(); + if (m_data) + s << "PUSH " << hex << data(); + else + s << "PUSH "; break; case UndefinedItem: s << "ANY"; break; default: - s << "t=" << dec << m_type << " d=" << hex << data(); + if (m_data) + s << "t=" << dec << m_type << " d=" << hex << data(); + else + s << "t=" << dec << m_type << " d: nullptr"; break; } if (!m_requireDataMatch) -- cgit v1.2.3