diff --git a/ChangeLog b/ChangeLog index 3515954e..f6204f44 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-08-07 Tatsuhiro Tsujikawa + + Fixed wrong argument passing to BitfieldMan::isBitSet() + * src/DefaultPieceStorage.cc + 2008-08-07 Tatsuhiro Tsujikawa Initialized _directIOAllowed diff --git a/src/DefaultPieceStorage.cc b/src/DefaultPieceStorage.cc index 6f1e6e02..c5cae14e 100644 --- a/src/DefaultPieceStorage.cc +++ b/src/DefaultPieceStorage.cc @@ -189,7 +189,7 @@ bool DefaultPieceStorage::getMissingFastPieceIndex(size_t& index, bitfieldMan->getTotalLength()); for(std::deque::const_iterator itr = peer->getPeerAllowedIndexSet().begin(); itr != peer->getPeerAllowedIndexSet().end(); itr++) { - if(!bitfieldMan->isBitSet(index) && peer->hasPiece(*itr)) { + if(!bitfieldMan->isBitSet(*itr) && peer->hasPiece(*itr)) { tempBitfield.setBit(*itr); } }