Skip to content

Commit

Permalink
Fix erroneous len() of int.
Browse files Browse the repository at this point in the history
  • Loading branch information
gconnell committed Aug 29, 2016
1 parent 0c3ffaf commit 1b746f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pcapgo/read.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ func (r *Reader) ReadPacketData() (data []byte, ci gopacket.CaptureInfo, err err
return
}
if ci.CaptureLength > int(r.snaplen) {
err = fmt.Errorf("capture length exceeds snap length: %d > %d", 16+ci.CaptureLength, len(r.snaplen))
err = fmt.Errorf("capture length exceeds snap length: %d > %d", 16+ci.CaptureLength, r.snaplen)
return
}
data = make([]byte, ci.CaptureLength)
Expand Down

0 comments on commit 1b746f6

Please sign in to comment.