summaryrefslogtreecommitdiffstats
path: root/routes/template.go
diff options
context:
space:
mode:
Diffstat (limited to 'routes/template.go')
-rw-r--r--routes/template.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/routes/template.go b/routes/template.go
index 408841a..20d678b 100644
--- a/routes/template.go
+++ b/routes/template.go
@@ -59,7 +59,7 @@ func countLines(r io.Reader) (int, error) {
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