ソースを参照

Fix `_File::get_buffer` length always set to p_length

(cherry picked from commit 33d6eccdeccebcdcb9cfdb9e0f5c9f7318e402d8)
Johannes 4 年 前
コミット
9a7e537aac
1 ファイル変更1 行追加1 行削除
  1. 1 1
      core/bind/core_bind.cpp

+ 1 - 1
core/bind/core_bind.cpp

@@ -2117,7 +2117,7 @@ PoolVector<uint8_t> _File::get_buffer(int p_length) const {
 	w.release();
 
 	if (len < p_length)
-		data.resize(p_length);
+		data.resize(len);
 
 	return data;
 }