summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorJohannes <johawitt@outlook.de>2021-04-11 23:11:13 +0200
committerJohannes <johawitt@outlook.de>2021-04-11 23:11:13 +0200
commit33d6eccdeccebcdcb9cfdb9e0f5c9f7318e402d8 (patch)
tree5740d76921d31c3406866bec413e0522af0ec49e /core
parent712bb8cbb6ee35b111c6171598a807dd2dd3046c (diff)
Fix `_File::get_buffer` length always set to p_length
Diffstat (limited to 'core')
-rw-r--r--core/core_bind.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/core_bind.cpp b/core/core_bind.cpp
index c3d547c2c7..84d8d0d4d3 100644
--- a/core/core_bind.cpp
+++ b/core/core_bind.cpp
@@ -1334,7 +1334,7 @@ Vector<uint8_t> _File::get_buffer(int p_length) const {
ERR_FAIL_COND_V(len < 0, Vector<uint8_t>());
if (len < p_length) {
- data.resize(p_length);
+ data.resize(len);
}
return data;