all repos — legit @ fd41ddefb05e908644a3f4c2919bd9a685ae5518

legit - simple git web interface in go (fork)

Merge branch 'linecount_fix'
Iris Lightshard nilix@nilfm.cc
commit

fd41ddefb05e908644a3f4c2919bd9a685ae5518

parent

da18f9eb1497e514cfe29ee8b1f15bc607264161

1 files changed, 1 insertions(+), 1 deletions(-)

jump to
M routes/template.goroutes/template.go

@@ -50,7 +50,7 @@

switch { case err == io.EOF: /* handle last line not having a newline at the end */ - if bufLen >= 1 && buf[bufLen-1] != '\n' { + if bufLen >= 1 && buf[(bufLen-1)%(32*1024)] != '\n' { count++ } return count, nil