mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-07-26 06:38:42 +00:00
interp: improve unknown opcode handling
This commit is contained in:
+4
-1
@@ -49,7 +49,10 @@ func (inst *instruction) String() string {
|
||||
operands[i] = op.String()
|
||||
}
|
||||
|
||||
name := instructionNameMap[inst.opcode]
|
||||
name := ""
|
||||
if int(inst.opcode) < len(instructionNameMap) {
|
||||
name = instructionNameMap[inst.opcode]
|
||||
}
|
||||
if name == "" {
|
||||
name = "<unknown op>"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user