summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorJordan Schidlowsky <jordan@winterpixel.com>2020-11-25 16:26:32 -0600
committerJordan Schidlowsky <jordan@winterpixel.com>2020-11-25 16:26:32 -0600
commitafa15c5f15c25bc6f6873b0b98cb81775cd1e0f4 (patch)
tree1b18367df18c883f530644b184d378427bc14a17 /modules
parent7e009a167110e79caa102c5b88363fd32b75293c (diff)
fixes crash for OPCODE_CAST_TO_NATIVE opcode in gdscript disassemlber
Diffstat (limited to 'modules')
-rw-r--r--modules/gdscript/gdscript_disassembler.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/modules/gdscript/gdscript_disassembler.cpp b/modules/gdscript/gdscript_disassembler.cpp
index c918251772..92a44c57f8 100644
--- a/modules/gdscript/gdscript_disassembler.cpp
+++ b/modules/gdscript/gdscript_disassembler.cpp
@@ -360,15 +360,12 @@ void GDScriptFunction::disassemble(const Vector<String> &p_code_lines) const {
incr += 4;
} break;
case OPCODE_CAST_TO_NATIVE: {
- Variant class_name = _constants_ptr[_code_ptr[ip + 1]];
- GDScriptNativeClass *nc = Object::cast_to<GDScriptNativeClass>(class_name.operator Object *());
-
text += "cast native ";
text += DADDR(2);
text += " = ";
text += DADDR(1);
text += " as ";
- text += nc->get_name();
+ text += DADDR(3);
incr += 4;
} break;