Fixes infinite loop in ResourceFormatText when having unexpected end of file

This commit is contained in:
Gilles Roudière 2022-11-15 09:50:26 +01:00
parent 98e0d59952
commit 83617790a1

View File

@ -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;
}
}
}