Commit f2e233d8c9ef56f29adca985325cc9696f7b4fb6

Stefan Sperling 2018-11-19T09:57:31

don't abort blame in annotate_line() if lines are out of range

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/lib/blame.c b/lib/blame.c
index 3bb1f98..ea25dfb 100644
--- a/lib/blame.c
+++ b/lib/blame.c
@@ -103,7 +103,7 @@ annotate_line(struct got_blame *blame, int lineno, struct got_object_id *id,
 	struct got_blame_line *line;
 
 	if (lineno < 1 || lineno > blame->nlines)
-		return got_error(GOT_ERR_RANGE);
+		return NULL;
 	
 	line = &blame->lines[lineno - 1];
 	if (line->annotated)