From 919e577eb7d6407c6c0808b042f1cbb22ab7c724 Mon Sep 17 00:00:00 2001 From: ache Date: Wed, 28 Dec 1994 14:11:21 +0000 Subject: Fix bug with printing out short archive entries, incorrect padding --- usr.bin/nm/nm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'usr.bin') diff --git a/usr.bin/nm/nm.c b/usr.bin/nm/nm.c index b4bf1c8..ce7344e 100644 --- a/usr.bin/nm/nm.c +++ b/usr.bin/nm/nm.c @@ -258,8 +258,7 @@ show_archive(fname, fp) else { p = ar_head.ar_name; - for (i = 0; i < sizeof(ar_head.ar_name); i++) - if (*p && *p != ' ') + for (i = 0; i < sizeof(ar_head.ar_name) && p[i] && p[i] != ' '; i++) ar_name[i] = p[i]; ar_name[i] = 0; } -- cgit v1.1