mirror of
https://github.com/Redot-Engine/redot-engine.git
synced 2025-12-06 07:17:42 -05:00
[Core] Fix FileAccessCompressed.get_buffer size error on multiples of block size
This commit is contained in:
@@ -270,6 +270,13 @@ uint64_t FileAccessCompressed::get_buffer(uint8_t *p_dst, uint64_t p_length) con
|
|||||||
read_block_size = read_block == read_block_count - 1 ? read_total % block_size : block_size;
|
read_block_size = read_block == read_block_count - 1 ? read_total % block_size : block_size;
|
||||||
read_pos = 0;
|
read_pos = 0;
|
||||||
|
|
||||||
|
if (read_block_size == 0) {
|
||||||
|
at_end = true;
|
||||||
|
if (i + 1 < p_length) {
|
||||||
|
read_eof = true;
|
||||||
|
}
|
||||||
|
return i + 1;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
read_block--;
|
read_block--;
|
||||||
at_end = true;
|
at_end = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user