Some missing io.EOFs

This commit is contained in:
Matt Joiner 2015-10-23 12:45:51 +11:00
parent 4c4eae20a2
commit db3ec698e9
1 changed files with 2 additions and 0 deletions

View File

@ -78,10 +78,12 @@ func (me *data) WriteSectionTo(w io.Writer, off, n int64) (written int64, err er
off %= me.info.PieceLength
for n != 0 {
if i >= me.info.NumPieces() {
err = io.EOF
break
}
p := me.info.Piece(i)
if off >= p.Length() {
err = io.EOF
break
}
var pr io.ReadCloser