diff --git a/core/os/directory.cpp b/core/os/directory.cpp index 1714a92..7dd2a8b 100644 --- a/core/os/directory.cpp +++ b/core/os/directory.cpp @@ -164,6 +164,8 @@ Vector Directory::read_file_bin(const String &path) { long fsize = ftell(f); fseek(f, 0, SEEK_SET); /* same as rewind(f); */ + fd.resize(fsize); + fread(fd.dataw(), 1, fsize, f); fclose(f);