Fix _File::get_buffer length always set to p_length

This commit is contained in:
Johannes 2021-04-11 23:11:13 +02:00
parent 712bb8cbb6
commit 33d6eccdec
No known key found for this signature in database
GPG Key ID: B988B760383F3A91

View File

@ -1334,7 +1334,7 @@ Vector<uint8_t> _File::get_buffer(int p_length) const {
ERR_FAIL_COND_V(len < 0, Vector<uint8_t>());
if (len < p_length) {
data.resize(p_length);
data.resize(len);
}
return data;