aboutsummaryrefslogtreecommitdiff
path: root/cmd/btcheck/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/btcheck/main.go')
-rw-r--r--cmd/btcheck/main.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/btcheck/main.go b/cmd/btcheck/main.go
index 2fc1b1c..d4c30b0 100644
--- a/cmd/btcheck/main.go
+++ b/cmd/btcheck/main.go
@@ -20,7 +20,7 @@ func main() {
}
buf := make([]byte, tor.Info.PieceLength)
for i, p := range tor.Info.Pieces {
- off := tor.Info.PieceLength * i
+ off := tor.Info.Offset(i)
n, err := tor.Info.ReadAt(buf, int64(off))
if err != nil {
log.Fatal(err)