X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=ls-tree.c;h=cc65ac472097b36d93100e7ba6821ebf873fecfd;hb=4bb972945cd7076d0b7b128fdf31015329ef9d52;hp=e845f662d71c46924d2fc8fe5a5166cfb78ec2b5;hpb=832b07a87c87f02cf17d748c075a84fc3a9b7afd;p=pciutils.git diff --git a/ls-tree.c b/ls-tree.c index e845f66..cc65ac4 100644 --- a/ls-tree.c +++ b/ls-tree.c @@ -239,7 +239,11 @@ tree_printf(char *line, char *p, char *fmt, ...) p += space; } else if (res >= space) - p += space; + { + /* Ancient C libraries do not truncate the output properly. */ + *(p+space-1) = 0; + p += space; + } else p += res;