Fix updating of maxLineLen (#147)
Previously, the line pointlessly updated the lastLineIdx variable
since the subsequent line always assigned to it.
Change it to update maxLineLen, which was the original intention.
diff --git a/cmp/report_slices.go b/cmp/report_slices.go
index 667a6e3..eafcf2e 100644
--- a/cmp/report_slices.go
+++ b/cmp/report_slices.go
@@ -90,7 +90,7 @@
}
if r == '\n' {
if maxLineLen < i-lastLineIdx {
- lastLineIdx = i - lastLineIdx
+ maxLineLen = i - lastLineIdx
}
lastLineIdx = i + 1
numLines++