diff --git a/core/os/directory.cpp b/core/os/directory.cpp index ca9478d..1714a92 100644 --- a/core/os/directory.cpp +++ b/core/os/directory.cpp @@ -122,6 +122,8 @@ String Directory::read_file(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);