interp: improve unknown opcode handling
Этот коммит содержится в:
родитель
58fafaeb5c
коммит
adadbadec3
1 изменённых файлов: 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>"
|
||||
}
|
||||
|
|
Загрузка…
Создание таблицы
Сослаться в новой задаче