2
0
Эх сурвалжийг харах

Merge pull request #85991 from jsjtxietian/fix-bad-pos-state

Fix `FileAccessPack::get_buffer` updating position past the length of file
Yuri Sizov 1 жил өмнө
parent
commit
a9a50938c0

+ 1 - 1
core/io/file_access_pack.cpp

@@ -327,7 +327,7 @@ uint64_t FileAccessPack::get_buffer(uint8_t *p_dst, uint64_t p_length) const {
 		to_read = (int64_t)pf.size - (int64_t)pos;
 	}
 
-	pos += p_length;
+	pos += to_read;
 
 	if (to_read <= 0) {
 		return 0;