Return string correctly if loading a supported text file.

This commit is contained in:
Pyral 2024-12-06 18:25:24 -05:00
parent 5069dd65c7
commit 9681ad0a07

2
vfs.gd
View File

@ -94,7 +94,7 @@ func load_supported(path:String, ext_override:String = "")->Variant:
var buffer := get_buffer(path)
var result:Variant = supported_files[ext].call(buffer)
if not is_instance_valid(result):
if not is_instance_valid(result) and result is not String:
push_warning("%s loader tried loading '%s' but received null. Does the file exist?"
% [ext, abs_path])