Commit dd031dc0f32a6e39337331580ed937aa466d05cf

Stefan Sperling 2018-07-04T12:56:01

fix off-by-one in got_blame()

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/lib/blame.c b/lib/blame.c
index d1fe9d3..b3d6dbe 100644
--- a/lib/blame.c
+++ b/lib/blame.c
@@ -318,7 +318,7 @@ got_blame(const char *path, struct got_object_id *start_commit_id,
 		return err;
 	}
 
-	for (lineno = 1; lineno < blame->nlines; lineno++) {
+	for (lineno = 1; lineno <= blame->nlines; lineno++) {
 		struct got_object_id *id;
 		char *line, *id_str;