Merge pull request #84934 from Faless/fix/file_get_buffer
[3.x] [Core] Fix `File.get_buffer` returning wrong length
This commit is contained in:
commit
bfc4baa289
|
@ -2177,7 +2177,7 @@ PoolVector<uint8_t> _File::get_buffer(int64_t p_length) const {
|
|||
w.release();
|
||||
|
||||
if (len < p_length) {
|
||||
data.resize(p_length);
|
||||
data.resize(len);
|
||||
}
|
||||
|
||||
return data;
|
||||
|
|
Loading…
Reference in New Issue