summaryrefslogtreecommitdiff
path: root/scene/resources/resource_format_text.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2022-11-15 11:56:41 +0100
committerRémi Verschelde <rverschelde@gmail.com>2022-11-15 11:56:41 +0100
commit7fda64a849bb01483e26d99b2cb5223c00e948da (patch)
treeca6c2c03b988ba0b462cdaf9c59027329a2bb5eb /scene/resources/resource_format_text.cpp
parent696740fe38d7dcf3e9a0eaf92d43494a138dbdd4 (diff)
parent83617790a1336e4faf7c891c62cbc4909eaf8aac (diff)
Merge pull request #68681 from groud/fix_infinite_loop_in_resource_loader
Fixes infinite loop in ResourceFormatText when having unexpected end of file
Diffstat (limited to 'scene/resources/resource_format_text.cpp')
-rw-r--r--scene/resources/resource_format_text.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/scene/resources/resource_format_text.cpp b/scene/resources/resource_format_text.cpp
index 85b538b1d9..98a4909599 100644
--- a/scene/resources/resource_format_text.cpp
+++ b/scene/resources/resource_format_text.cpp
@@ -511,6 +511,7 @@ Error ResourceLoaderText::load() {
if (error) {
_printerr();
+ return error;
}
resource_current++;
@@ -884,6 +885,7 @@ void ResourceLoaderText::get_dependencies(Ref<FileAccess> p_f, List<String> *p_d
error_text = "Unexpected end of file";
_printerr();
error = ERR_FILE_CORRUPT;
+ return;
}
}
}