diff options
author | Gilles Roudière <gilles.roudiere@gmail.com> | 2022-11-15 09:50:26 +0100 |
---|---|---|
committer | Gilles Roudière <gilles.roudiere@gmail.com> | 2022-11-15 11:20:05 +0100 |
commit | 83617790a1336e4faf7c891c62cbc4909eaf8aac (patch) | |
tree | 5cb781a4bb39484d5eb0c16bd36d256ca90bdd55 /scene/resources | |
parent | 98e0d599529aee2b090d84acbd9aaa28572c0da8 (diff) |
Fixes infinite loop in ResourceFormatText when having unexpected end of file
Diffstat (limited to 'scene/resources')
-rw-r--r-- | scene/resources/resource_format_text.cpp | 2 |
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; } } } |