Browse Source

interp: improve unknown opcode handling

pull/3921/head
Kenneth Bell 1 year ago
committed by Ayke
parent
commit
adadbadec3
  1. 5
      interp/compiler.go

5
interp/compiler.go

@ -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>"
}

Loading…
Cancel
Save