X-Git-Url: https://gitweb.ps.run/ps-cgit/blobdiff_plain/65b7b876aaaf50fc15060533359d6561f4f1819a..d529c6fbdca7ce3782e75b3a74baad21ef2f92c3:/ui-tree.c diff --git a/ui-tree.c b/ui-tree.c index 79332fc..4bf372a 100644 --- a/ui-tree.c +++ b/ui-tree.c @@ -54,8 +54,10 @@ static void print_object(const unsigned char *sha1, char *path) } idx++; } - htmlf(linefmt, ++lineno); - html_txt(buf + start); + if (start < idx) { + htmlf(linefmt, ++lineno); + html_txt(buf + start); + } html("\n"); html("\n"); }