diff options
-rw-r--r-- | src/cmd/ls.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/ls.c b/src/cmd/ls.c index 60615059..fca3ee95 100644 --- a/src/cmd/ls.c +++ b/src/cmd/ls.c @@ -143,7 +143,7 @@ output(void) char buf[4096]; char *s; - if(!nflag) + if(!nflag && dirbuf!=0) qsort(dirbuf, ndir, sizeof dirbuf[0], (int (*)(const void*, const void*))compar); for(i=0; i<ndir; i++) dowidths(dirbuf[i].d); |