From 5b0abf8378d497c5a8881771518df6a02404d031 Mon Sep 17 00:00:00 2001 From: Alexander Trufanov Date: Tue, 16 Jun 2020 13:47:42 +0300 Subject: [PATCH] Fix a bug in MultiFileCache Differential Revision: https://phabricator.kde.org/D29852 --- src/diskio/multifilecache.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/diskio/multifilecache.cpp b/src/diskio/multifilecache.cpp index 0a513ad..882630e 100644 --- a/src/diskio/multifilecache.cpp +++ b/src/diskio/multifilecache.cpp @@ -455,7 +455,7 @@ namespace bt off = file_off + (piece_off - chunk_off); len = piece_len; } - else if(piece_off >= chunk_off && piece_len < chunk_off + chunk_len) + else if(piece_off >= chunk_off && piece_off < chunk_off + chunk_len) { // The start of the piece lies partially in the current file off = file_off + (piece_off - chunk_off); -- GitLab