disassemble: fix opcode range check

This commit is contained in:
Michael Sippel 2024-10-18 20:56:31 +02:00
parent 09cd134406
commit 90bca05e2c
Signed by: senvas
GPG key ID: F96CF119C34B64A6

View file

@ -39,7 +39,7 @@ pub fn disassemble(bytecode: &Vec< AssemblyWord >) -> Vec< String > {
}
AssemblyWord::Lit(w) => {
if remaining_params == 0 {
if *w < 18 {
if *w < 32 {
let inst : VM_Instruction = unsafe { std::mem::transmute(*w) };
result.push(format!("{:?}", inst));
remaining_params = inst.param_length();