diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp index 514a22fa6bc..0e34aa97b7c 100644 --- a/core/bind/core_bind.cpp +++ b/core/bind/core_bind.cpp @@ -2117,7 +2117,7 @@ PoolVector _File::get_buffer(int p_length) const { w.release(); if (len < p_length) - data.resize(p_length); + data.resize(len); return data; }