torrent: avoid trying to fetch blocks past file
This commit is contained in:
parent
d0f824edc2
commit
9f755671fb
1 changed files with 2 additions and 1 deletions
|
@ -811,7 +811,8 @@ Error:
|
|||
}
|
||||
}
|
||||
}
|
||||
havepiece(off / blocksize, w->str);
|
||||
if(off < f->off + f->len)
|
||||
havepiece(off / blocksize, w->str);
|
||||
havepiece(f->off / blocksize, w->str);
|
||||
close(fd);
|
||||
exits(0);
|
||||
|
|
Loading…
Reference in a new issue