diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2010-10-31 04:36:38 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2010-10-31 04:36:38 +0000 |
| commit | 6e88cae02b276ceb107c1984347f30cb2732e8eb (patch) | |
| tree | 840fd4ea8d613f1c401bbb3849f03d5094adf079 /src/HttpRequestCommand.cc | |
| parent | 236e64cb25a054eed3fa8888168e71d09decf561 (diff) | |
2010-10-31 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fixed the bug that downloading > 4GB file fails on 32bit systems.
* src/HttpRequest.cc
* src/HttpRequestCommand.cc
Diffstat (limited to 'src/HttpRequestCommand.cc')
| -rw-r--r-- | src/HttpRequestCommand.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/HttpRequestCommand.cc b/src/HttpRequestCommand.cc index 6bea5f84..91a7d4b4 100644 --- a/src/HttpRequestCommand.cc +++ b/src/HttpRequestCommand.cc @@ -188,7 +188,8 @@ bool HttpRequestCommand::executeInternal() { getPieceStorage()->getNextUsedIndex(segment->getIndex()); endOffset = std::min (static_cast<off_t>(getFileEntry()->getLength()), - getFileEntry()->gtoloff(segment->getSegmentLength()*nextIndex)); + getFileEntry()->gtoloff + (static_cast<off_t>(segment->getSegmentLength())*nextIndex)); } SharedHandle<HttpRequest> httpRequest (createHttpRequest(getRequest(), |
