Merge pull request #68681 from groud/fix_infinite_loop_in_resource_loader

Fixes infinite loop in ResourceFormatText when having unexpected end of file
This commit is contained in:
Rémi Verschelde 2022-11-15 11:56:41 +01:00
commit 7fda64a849
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 2 additions and 0 deletions

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