diff --git a/core/core_bind.cpp b/core/core_bind.cpp index c3d547c2c73..84d8d0d4d39 100644 --- a/core/core_bind.cpp +++ b/core/core_bind.cpp @@ -1334,7 +1334,7 @@ Vector _File::get_buffer(int p_length) const { ERR_FAIL_COND_V(len < 0, Vector()); if (len < p_length) { - data.resize(p_length); + data.resize(len); } return data;