diff --git a/ChangeLog b/ChangeLog index f3e84e12..24e04ec5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2010-09-10 Tatsuhiro Tsujikawa + + Make finished() return true only when offset == totalLength. + * src/AdaptiveFileAllocationIterator.cc + * src/SingleFileAllocationIterator.cc + 2010-09-09 Tatsuhiro Tsujikawa Moved connectedHostname, connectedAddr and connectedPort to diff --git a/src/AdaptiveFileAllocationIterator.cc b/src/AdaptiveFileAllocationIterator.cc index d8586384..19010217 100644 --- a/src/AdaptiveFileAllocationIterator.cc +++ b/src/AdaptiveFileAllocationIterator.cc @@ -93,7 +93,7 @@ void AdaptiveFileAllocationIterator::allocateChunk() bool AdaptiveFileAllocationIterator::finished() { if(allocator_.isNull()) { - return (uint64_t)offset_ >= totalLength_; + return (uint64_t)offset_ == totalLength_; } else { return allocator_->finished(); } diff --git a/src/SingleFileAllocationIterator.cc b/src/SingleFileAllocationIterator.cc index b67ce9cd..019c2ce7 100644 --- a/src/SingleFileAllocationIterator.cc +++ b/src/SingleFileAllocationIterator.cc @@ -84,7 +84,7 @@ void SingleFileAllocationIterator::allocateChunk() bool SingleFileAllocationIterator::finished() { - return (uint64_t)offset_ >= totalLength_; + return (uint64_t)offset_ == totalLength_; } } // namespace aria2