From adadbadec30b59f857ce48d7de547c0315d53356 Mon Sep 17 00:00:00 2001 From: Kenneth Bell Date: Tue, 12 Sep 2023 16:46:48 +0100 Subject: [PATCH] interp: improve unknown opcode handling --- interp/compiler.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/interp/compiler.go b/interp/compiler.go index f0a096862d..37faaae541 100644 --- a/interp/compiler.go +++ b/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 = "" }