Commit 2811168fb08999d3a7e9f5170ccec0d9252df4c4

Stefan Sperling 2018-07-04T12:53:44

fix off-by-one in blame_open()

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/lib/blame.c b/lib/blame.c
index 6753bf2..d1fe9d3 100644
--- a/lib/blame.c
+++ b/lib/blame.c
@@ -258,7 +258,7 @@ blame_open(struct got_blame **blamep, const char *path,
 	}
 
 	/* Annotate remaining non-annotated lines with last commit. */
-	for (lineno = 1; lineno < blame->nlines; lineno++)
+	for (lineno = 1; lineno <= blame->nlines; lineno++)
 		annotate_line(blame, lineno, id);
 
 done: