diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2023-02-01 11:03:25 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2023-02-01 11:03:25 +0100 |
commit | 061b0464014075d779b3679901a61c137746de34 (patch) | |
tree | 9e2deef97bdd02f120dfcf93afc703bb32725a20 | |
parent | e044b56ccf3057bf56b1995fca9c21607b0e7ffc (diff) | |
parent | 56aedb256e8be4a8e22dcef1bd65f2e4cda4e1a9 (diff) |
Merge pull request #72499 from vonagam/fix-typed-array-disassembly
GDScript: Fix disassembly of typed array assignment and construction
-rw-r--r-- | modules/gdscript/gdscript_disassembler.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/gdscript/gdscript_disassembler.cpp b/modules/gdscript/gdscript_disassembler.cpp index 9070ba93e7..d4f4358ac1 100644 --- a/modules/gdscript/gdscript_disassembler.cpp +++ b/modules/gdscript/gdscript_disassembler.cpp @@ -317,7 +317,7 @@ void GDScriptFunction::disassemble(const Vector<String> &p_code_lines) const { text += " = "; text += DADDR(2); - incr += 3; + incr += 6; } break; case OPCODE_ASSIGN_TYPED_NATIVE: { text += "assign typed native ("; @@ -434,7 +434,7 @@ void GDScriptFunction::disassemble(const Vector<String> &p_code_lines) const { int instr_var_args = _code_ptr[++ip]; int argc = _code_ptr[ip + 1 + instr_var_args]; - Ref<Script> script_type = get_constant(_code_ptr[ip + argc + 2]); + Ref<Script> script_type = get_constant(_code_ptr[ip + argc + 2] & GDScriptFunction::ADDR_MASK); Variant::Type builtin_type = (Variant::Type)_code_ptr[ip + argc + 4]; StringName native_type = get_global_name(_code_ptr[ip + argc + 5]); @@ -463,7 +463,7 @@ void GDScriptFunction::disassemble(const Vector<String> &p_code_lines) const { text += "]"; - incr += 4 + instr_var_args; + incr += 6 + argc; } break; case OPCODE_CONSTRUCT_DICTIONARY: { int instr_var_args = _code_ptr[++ip]; |