Skip to content

Commit

Permalink
save
Browse files Browse the repository at this point in the history
  • Loading branch information
AskAlexSharov committed Jul 17, 2024
1 parent bee26b6 commit ae960e5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion peerconn.go
Original file line number Diff line number Diff line change
Expand Up @@ -1277,7 +1277,7 @@ file:
curFileBeginPiece := nextFileBeginPiece
nextFileBeginPiece += fileNumPieces
haveAllHashes := true
for i := range fileNumPieces {
for i := 0; i < fileNumPieces; i++ {
torrentPieceIndex := curFileBeginPiece + i
if !pc.peerHasPiece(torrentPieceIndex) {
continue file
Expand Down
2 changes: 1 addition & 1 deletion torrent.go
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ files:
errs = append(errs, fmt.Errorf("%v: expected hash %x got %x", f, f.piecesRoot.Value, root))
continue files
}
for i := range f.numPieces() {
for i := 0; i < f.numPieces(); i++ {
pi := f.BeginPieceIndex() + i
p := t.piece(pi)
p.setV2Hash(hashes[i])
Expand Down

0 comments on commit ae960e5

Please sign in to comment.