fix issue when skipping missing files during fill checks

This commit is contained in:
arvidn 2016-12-12 19:03:25 -05:00 committed by Arvid Norberg
parent a05f0ba8a4
commit 51fb7feeb7
1 changed files with 2 additions and 3 deletions

View File

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