From cd548cc83df0c6746e0ce90c396327b3b9b0a096 Mon Sep 17 00:00:00 2001 From: Relintai Date: Tue, 26 Apr 2022 22:41:33 +0200 Subject: [PATCH] Also fix read_file_bin. --- core/os/directory.cpp | 2 ++ 1 file changed, 2 insertions(+) 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);