diff options
author | Dmitrii Maganov <vonagam@gmail.com> | 2023-02-01 11:18:54 +0200 |
---|---|---|
committer | Dmitrii Maganov <vonagam@gmail.com> | 2023-02-01 11:18:54 +0200 |
commit | 56aedb256e8be4a8e22dcef1bd65f2e4cda4e1a9 (patch) | |
tree | ec9064b2eedea0fa10e46a9d40ac45dc1e118776 /modules | |
parent | 394bb0ee2bcd863aed75e1c6799c4c8138dbf269 (diff) |
GDScript: Fix disassembly of typed array assignment and construction
Diffstat (limited to 'modules')
-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]; |