mirror of
https://github.com/godotengine/godot.git
synced 2025-01-18 20:40:57 +08:00
Fixes infinite loop in ResourceFormatText when having unexpected end of file
This commit is contained in:
parent
98e0d59952
commit
83617790a1
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user