diff options
author | ache <ache@FreeBSD.org> | 1994-12-28 14:11:21 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 1994-12-28 14:11:21 +0000 |
commit | 919e577eb7d6407c6c0808b042f1cbb22ab7c724 (patch) | |
tree | bc992b22f433ac361e2e905ffde76ad870e85a64 /usr.bin | |
parent | a120a7d833f78ba650b27ec5e3484f216ee99b11 (diff) | |
download | FreeBSD-src-919e577eb7d6407c6c0808b042f1cbb22ab7c724.zip FreeBSD-src-919e577eb7d6407c6c0808b042f1cbb22ab7c724.tar.gz |
Fix bug with printing out short archive entries,
incorrect padding
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/nm/nm.c | 3 |
1 files changed, 1 insertions, 2 deletions
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; } |