diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp index 69064edb8..9ca0e8e64 100644 --- a/core/bind/core_bind.cpp +++ b/core/bind/core_bind.cpp @@ -2175,7 +2175,7 @@ PoolVector _File::get_buffer(int64_t p_length) const { w.release(); if (len < p_length) { - data.resize(p_length); + data.resize(len); } return data;