From 4e28033c9c813666c78549c2a0b557e8d53680f7 Mon Sep 17 00:00:00 2001 From: Yaroslav Pronin Date: Tue, 11 Sep 2018 17:56:55 +0000 Subject: [PATCH] Fix typo in variable name --- src/base/bittorrent/torrentinfo.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/base/bittorrent/torrentinfo.cpp b/src/base/bittorrent/torrentinfo.cpp index a5a38d888..df96014a6 100644 --- a/src/base/bittorrent/torrentinfo.cpp +++ b/src/base/bittorrent/torrentinfo.cpp @@ -339,9 +339,9 @@ TorrentInfo::PieceRange TorrentInfo::filePieces(int fileIndex) const const libt::file_storage &files = nativeInfo()->files(); const auto fileSize = files.file_size(fileIndex); - const auto firstOffset = files.file_offset(fileIndex); - return makeInterval(static_cast(firstOffset / pieceLength()), - static_cast((firstOffset + fileSize - 1) / pieceLength())); + const auto fileOffset = files.file_offset(fileIndex); + return makeInterval(static_cast(fileOffset / pieceLength()), + static_cast((fileOffset + fileSize - 1) / pieceLength())); } void TorrentInfo::renameFile(const int index, const QString &newPath)