Skip to content

Commit

Permalink
Fix #51 - empty lines missing and following line starting with a new …
Browse files Browse the repository at this point in the history
…line
  • Loading branch information
driskell committed Sep 29, 2014
1 parent 515f1da commit bf26040
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lc-lib/harvester/linereader.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func (lr *LineReader) ReadSlice() ([]byte, error) {
}

for {
if n := bytes.IndexByte(lr.buf[lr.start:lr.end], '\n'); n > 0 {
if n := bytes.IndexByte(lr.buf[lr.start:lr.end], '\n'); n >= 0 {
line := lr.buf[lr.start:lr.start+n+1]
lr.start += n + 1
return line, nil
Expand Down

0 comments on commit bf26040

Please sign in to comment.