assert we don't ask for physical offset of a pad file

This commit is contained in:
Arvid Norberg 2010-11-14 08:17:27 +00:00
parent 26b48530d2
commit 2353cc8ec2
1 changed files with 1 additions and 0 deletions

View File

@ -1048,6 +1048,7 @@ ret:
size_type tor_off = size_type(slot)
* files().piece_length() + offset;
file_storage::iterator file_iter = files().file_at_offset(tor_off);
TORRENT_ASSERT(!file_iter->pad_file);
size_type file_offset = tor_off - file_iter->offset;
TORRENT_ASSERT(file_offset >= 0);