From c9cab7ac9fd94e508f23786042a655fa804e1856 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Fri, 28 Feb 2020 17:45:33 -0300 Subject: Properly handle EOF when parsing text resource Fixes #36652 --- scene/resources/resource_format_text.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'scene') 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 ResourceLoaderText::_parse_node_tag(VariantParser::ResourcePars _printerr(); return Ref(); } else { + error = OK; return packed_scene; } } @@ -367,6 +368,7 @@ Ref ResourceLoaderText::_parse_node_tag(VariantParser::ResourcePars _printerr(); return Ref(); } else { + error = OK; return packed_scene; } } @@ -390,6 +392,7 @@ Ref ResourceLoaderText::_parse_node_tag(VariantParser::ResourcePars _printerr(); return Ref(); } 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); } -- cgit v1.2.3