diff options
author | Juan Linietsky <juan@godotengine.org> | 2020-02-28 17:45:33 -0300 |
---|---|---|
committer | Juan Linietsky <juan@godotengine.org> | 2020-02-28 17:45:33 -0300 |
commit | c9cab7ac9fd94e508f23786042a655fa804e1856 (patch) | |
tree | c85681382e4ae25ac7219222de19a0295b2c3e56 | |
parent | 620030b600b375545ecab5190615e08919e56da4 (diff) |
Properly handle EOF when parsing text resource
Fixes #36652
-rw-r--r-- | scene/resources/resource_format_text.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/scene/resources/resource_format_text.cpp b/scene/resources/resource_format_text.cpp index f07161d620..97bd12c119 100644 --- a/scene/resources/resource_format_text.cpp +++ b/scene/resources/resource_format_text.cpp @@ -293,6 +293,7 @@ Ref<PackedScene> ResourceLoaderText::_parse_node_tag(VariantParser::ResourcePars _printerr(); return Ref<PackedScene>(); } else { + error = OK; return packed_scene; } } @@ -367,6 +368,7 @@ Ref<PackedScene> ResourceLoaderText::_parse_node_tag(VariantParser::ResourcePars _printerr(); return Ref<PackedScene>(); } else { + error = OK; return packed_scene; } } @@ -390,6 +392,7 @@ Ref<PackedScene> ResourceLoaderText::_parse_node_tag(VariantParser::ResourcePars _printerr(); return Ref<PackedScene>(); } else { + error = OK; return packed_scene; } } @@ -641,6 +644,7 @@ Error ResourceLoaderText::load() { if (error != ERR_FILE_EOF) { _printerr(); } else { + error = OK; if (!ResourceCache::has(res_path)) { resource->set_path(res_path); } |