From 1b746f68116cb7c7ada4625eb718cf45e67dc31a Mon Sep 17 00:00:00 2001 From: Graeme Connell Date: Mon, 29 Aug 2016 10:36:11 -0600 Subject: [PATCH] Fix erroneous len() of int. --- pcapgo/read.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pcapgo/read.go b/pcapgo/read.go index f8853234c..65d1b2222 100644 --- a/pcapgo/read.go +++ b/pcapgo/read.go @@ -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)