disassemble: fix opcode range check
This commit is contained in:
parent
09cd134406
commit
90bca05e2c
1 changed files with 1 additions and 1 deletions
|
@ -39,7 +39,7 @@ pub fn disassemble(bytecode: &Vec< AssemblyWord >) -> Vec< String > {
|
||||||
}
|
}
|
||||||
AssemblyWord::Lit(w) => {
|
AssemblyWord::Lit(w) => {
|
||||||
if remaining_params == 0 {
|
if remaining_params == 0 {
|
||||||
if *w < 18 {
|
if *w < 32 {
|
||||||
let inst : VM_Instruction = unsafe { std::mem::transmute(*w) };
|
let inst : VM_Instruction = unsafe { std::mem::transmute(*w) };
|
||||||
result.push(format!("{:?}", inst));
|
result.push(format!("{:?}", inst));
|
||||||
remaining_params = inst.param_length();
|
remaining_params = inst.param_length();
|
||||||
|
|
Loading…
Reference in a new issue