Fix an off by one error

This commit is contained in:
lordwelch 2020-01-31 19:44:33 -08:00
parent a0e2601d2f
commit 03ec054d8b

View File

@ -124,7 +124,7 @@ func write(p []byte) (n int, err error) {
case cur.Comment:
var n int
n = bytes.Index(p[index+s:], []byte("\n"))
n = bytes.Index(p[index+s:], []byte("\n")) + 1
if n < 0 {
n = 0
}