From 40fb16b703527e92bd4a80a0d1b59fdb747b652b Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Tue, 12 Jul 2011 08:53:20 +0000 Subject: [PATCH] fix for pad-files --- src/storage.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/storage.cpp b/src/storage.cpp index baed85f81..e9bb7305f 100644 --- a/src/storage.cpp +++ b/src/storage.cpp @@ -994,6 +994,8 @@ ret: ++file_iter; if (file_iter == files().end()) return size_type(slot) * files().piece_length() + offset; + // update offset as well, since we're moving it up ahead + tor_off = file_iter->offset; } TORRENT_ASSERT(!file_iter->pad_file);