summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2020-02-28 22:04:40 +0100
committerGitHub <noreply@github.com>2020-02-28 22:04:40 +0100
commitf3c7019177181b65974b93e61c94f70e32b33a9b (patch)
treec85681382e4ae25ac7219222de19a0295b2c3e56 /scene
parent620030b600b375545ecab5190615e08919e56da4 (diff)
parentc9cab7ac9fd94e508f23786042a655fa804e1856 (diff)
Merge pull request #36658 from reduz/fix-resource-loader-text
Properly handle EOF when parsing text resource
Diffstat (limited to 'scene')
-rw-r--r--scene/resources/resource_format_text.cpp4
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);
}