diff --git a/tail.go b/tail.go index ee890a7..34ef4cc 100644 --- a/tail.go +++ b/tail.go @@ -312,6 +312,7 @@ func (tail *Tail) waitForChanges() error { func (tail *Tail) newReader() *bufio.Reader { if tail.MaxLineSize > 0 { + // add 2 to account for newline characters return bufio.NewReaderSize(tail.file, tail.MaxLineSize+2) } else { return bufio.NewReader(tail.file)