Fix FileAccessPack::get_buffer will update pos past the length of file

This commit is contained in:
jsjtxietian 2023-12-10 16:21:16 +08:00
parent b94eb58d35
commit 68a6fe81ab
1 changed files with 1 additions and 1 deletions

View File

@ -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;