diff --git a/misc/lnstat.c b/misc/lnstat.c index 89cb0e7e..98904d45 100644 --- a/misc/lnstat.c +++ b/misc/lnstat.c @@ -210,8 +210,9 @@ static struct table_hdr *build_hdr_string(struct lnstat_file *lnstat_files, } ofs += width+1; } + /* fill in spaces */ - for (h = 1; h <= th.num_lines; h++) { + for (h = 1; h < th.num_lines; h++) { for (i = 0; i < ofs; i++) { if (th.hdr[h][i] == '\0') th.hdr[h][i] = ' ';