From: Jonas Fonseca Date: Sat, 24 Jan 2009 12:24:04 +0000 (+0100) Subject: Fix floating point bug in the blame reporting X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=fa6db1b4558800ecdeb1554943b7ccb701cafa4d;p=tig.git Fix floating point bug in the blame reporting --- 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));