From 9681ad0a078dbf9db84445babd6b0d2d1982b457 Mon Sep 17 00:00:00 2001 From: Pyral Date: Fri, 6 Dec 2024 18:25:24 -0500 Subject: [PATCH] Return string correctly if loading a supported text file. --- vfs.gd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vfs.gd b/vfs.gd index f0b8175..27f08fb 100644 --- a/vfs.gd +++ b/vfs.gd @@ -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])