summaryrefslogtreecommitdiff
path: root/scene/resources/text_file.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/resources/text_file.cpp')
-rw-r--r--scene/resources/text_file.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/scene/resources/text_file.cpp b/scene/resources/text_file.cpp
index cf07003720..33bb0a83e9 100644
--- a/scene/resources/text_file.cpp
+++ b/scene/resources/text_file.cpp
@@ -30,7 +30,7 @@
#include "text_file.h"
-#include "core/os/file_access.h"
+#include "core/io/file_access.h"
bool TextFile::has_text() const {
return text != "";
@@ -55,10 +55,10 @@ Error TextFile::load_text(const String &p_path) {
ERR_FAIL_COND_V_MSG(err, err, "Cannot open TextFile '" + p_path + "'.");
- int len = f->get_len();
+ uint64_t len = f->get_length();
sourcef.resize(len + 1);
uint8_t *w = sourcef.ptrw();
- int r = f->get_buffer(w, len);
+ uint64_t r = f->get_buffer(w, len);
f->close();
memdelete(f);
ERR_FAIL_COND_V(r != len, ERR_CANT_OPEN);