diff --git a/builtin-blame.c b/builtin-blame.c
index 98e818ce6a63b352182b428b49464596d37a0617..fc1586350f94ae48e7e48a51818517b465e7a40d 100644 (file)
--- a/builtin-blame.c
+++ b/builtin-blame.c
{
int i, width;
- for (width = 1, i = 10; i <= lines + 1; width++)
+ for (width = 1, i = 10; i <= lines; width++)
i *= 10;
return width;
}
die_errno("cannot stat path '%s'", path);
}
+ revs.disable_stdin = 1;
setup_revisions(argc, argv, &revs, NULL);
memset(&sb, 0, sizeof(sb));
if (top < 1)
top = lno;
bottom--;
- if (lno < top)
+ if (lno < top || lno < bottom)
die("file %s has only %lu lines", path, lno);
ent = xcalloc(1, sizeof(*ent));