diff --git a/src/storage.cpp b/src/storage.cpp index 9bd140c07..9e08d773d 100644 --- a/src/storage.cpp +++ b/src/storage.cpp @@ -915,9 +915,8 @@ namespace libtorrent // OK, this file existed, good. Now, skip all remaining pieces in // this file. We're just sanity-checking whether the files exist // or not. - peer_request const pr = fs.map_file(file_index, 0 - , int(fs.file_size(file_index) + 1)); - i = (std::max)(i + 1, pr.piece); + peer_request const pr = fs.map_file(file_index, fs.file_size(file_index), 0); + i = std::max(i + 1, pr.piece); } return true; }