aboutsummaryrefslogtreecommitdiffstats
path: root/libevmasm/SimplificationRules.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libevmasm/SimplificationRules.cpp')
-rw-r--r--libevmasm/SimplificationRules.cpp10
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)