diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp index c26fa7ef9b1..fac5ced952b 100644 --- a/core/bind/core_bind.cpp +++ b/core/bind/core_bind.cpp @@ -2177,7 +2177,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;