From 33d6eccdeccebcdcb9cfdb9e0f5c9f7318e402d8 Mon Sep 17 00:00:00 2001 From: Johannes Date: Sun, 11 Apr 2021 23:11:13 +0200 Subject: [PATCH] Fix `_File::get_buffer` length always set to p_length --- core/core_bind.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;