diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-01-06 09:20:27 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-06 09:20:27 +0100 |
commit | 0157742422c5f17e49237ecdfc643e943de31412 (patch) | |
tree | e6b10cd8c5cb403873e0b4af2a44622feaf715a2 /core | |
parent | 98693e96ae0dea9c7fe1b78b7b04961fc73f37a6 (diff) | |
parent | e8f7b79bb00870a6c6b64f81f9a6d7ecea50d823 (diff) |
Merge pull request #53434 from Faless/io/4.x_file_access_compressed
[File] Fix FileAccessCompressed::get_buffer return value.
Diffstat (limited to 'core')
-rw-r--r-- | core/io/file_access_compressed.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/io/file_access_compressed.cpp b/core/io/file_access_compressed.cpp index 715468f71d..526952b14f 100644 --- a/core/io/file_access_compressed.cpp +++ b/core/io/file_access_compressed.cpp @@ -312,10 +312,10 @@ uint64_t FileAccessCompressed::get_buffer(uint8_t *p_dst, uint64_t p_length) con } else { read_block--; at_end = true; - if (i < p_length - 1) { + if (i + 1 < p_length) { read_eof = true; } - return i; + return i + 1; } } } |