summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Libraries/LibX86/Instruction.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/Libraries/LibX86/Instruction.cpp b/Libraries/LibX86/Instruction.cpp
index 9d7ecc92bc..e4ae2367f5 100644
--- a/Libraries/LibX86/Instruction.cpp
+++ b/Libraries/LibX86/Instruction.cpp
@@ -1286,6 +1286,9 @@ String Instruction::to_string(u32 origin, bool x32) const
String Instruction::to_string_internal(u32 origin, bool x32) const
{
+ if (!m_descriptor)
+ return String::format("db %#02x", m_op);
+
StringBuilder builder;
String mnemonic = String(m_descriptor->mnemonic).to_lowercase();