From fa6db1b4558800ecdeb1554943b7ccb701cafa4d Mon Sep 17 00:00:00 2001 From: Jonas Fonseca Date: Sat, 24 Jan 2009 13:24:04 +0100 Subject: [PATCH] Fix floating point bug in the blame reporting --- tig.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tig.c b/tig.c index 16dba6b..ec7f267 100644 --- a/tig.c +++ b/tig.c @@ -4062,7 +4062,7 @@ blame_read(struct view *view, char *line) if (!commit) { commit = parse_blame_commit(view, line, &blamed); string_format(view->ref, "%s %2d%%", view->vid, - blamed * 100 / view->lines); + view->lines ? blamed * 100 / view->lines : 0); } else if (match_blame_header("author ", &line)) { string_ncopy(commit->author, line, strlen(line)); -- 2.30.2