summaryrefslogtreecommitdiff
path: root/src/DownloadCommand.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/DownloadCommand.cc')
-rw-r--r--src/DownloadCommand.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/DownloadCommand.cc b/src/DownloadCommand.cc
index 37da0cbb..2862d3d3 100644
--- a/src/DownloadCommand.cc
+++ b/src/DownloadCommand.cc
@@ -146,8 +146,8 @@ bool DownloadCommand::executeInternal() {
size_t bufSize;
if(sinkFilterOnly_) {
if(segment->getLength() > 0) {
- if(static_cast<uint64_t>(segment->getPosition()+segment->getLength()) <=
- static_cast<uint64_t>(getFileEntry()->getLastOffset())) {
+ if(static_cast<off_t>(segment->getPosition()+segment->getLength()) <=
+ getFileEntry()->getLastOffset()) {
bufSize = std::min(segment->getLength()-segment->getWrittenLength(),
getSocketRecvBuffer()->getBufferLength());
} else {