diff options
author | chriseth <c@ethdev.com> | 2017-01-10 23:35:10 +0800 |
---|---|---|
committer | chriseth <c@ethdev.com> | 2017-01-13 00:52:27 +0800 |
commit | 7127f2fdfdc1bfb8efd9a1212725e36c3c42ad9a (patch) | |
tree | 1d80abd9d9f9373f7ddc7bf8e8877594cf61c2c6 /libevmasm | |
parent | da5e171f3b7a8d16fb01f4366f61a301567f1ae2 (diff) | |
download | dexon-solidity-7127f2fdfdc1bfb8efd9a1212725e36c3c42ad9a.tar.gz dexon-solidity-7127f2fdfdc1bfb8efd9a1212725e36c3c42ad9a.tar.zst dexon-solidity-7127f2fdfdc1bfb8efd9a1212725e36c3c42ad9a.zip |
Fix debug output.
Diffstat (limited to 'libevmasm')
-rw-r--r-- | libevmasm/SimplificationRules.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
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) |