diff options
-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; } |