diff options
author | Julien Nguyen <julien.nguyen3@gmail.com> | 2021-08-09 23:52:31 +0200 |
---|---|---|
committer | Julien Nguyen <julien.nguyen3@gmail.com> | 2021-08-09 23:52:31 +0200 |
commit | 51b7179b5ad9f513ea978b6c8914a57b1841d2e2 (patch) | |
tree | c5f4f2ee0ca1717ca574ad0949ad852f03708a8e /modules/gdscript | |
parent | 9d9161c71956201875334b6a2a9ca37a7d5d3970 (diff) |
Fix infinite loop when creating a newly inherited GdScript file
Diffstat (limited to 'modules/gdscript')
-rw-r--r-- | modules/gdscript/gdscript_compiler.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/gdscript/gdscript_compiler.cpp b/modules/gdscript/gdscript_compiler.cpp index 7c9d08b782..fe827a5b72 100644 --- a/modules/gdscript/gdscript_compiler.cpp +++ b/modules/gdscript/gdscript_compiler.cpp @@ -107,7 +107,7 @@ GDScriptDataType GDScriptCompiler::_gdtype_from_datatype(const GDScriptParser::D // Locate class by constructing the path to it and following that path GDScriptParser::ClassNode *class_type = p_datatype.class_type; if (class_type) { - if (class_type->fqcn.begins_with(main_script->path) || (!main_script->name.is_empty() && class_type->fqcn.begins_with(main_script->name))) { + if ((!main_script->path.is_empty() && class_type->fqcn.begins_with(main_script->path)) || (!main_script->name.is_empty() && class_type->fqcn.begins_with(main_script->name))) { // Local class. List<StringName> names; while (class_type->outer) { |