fixed ls
This commit is contained in:
parent
c6e315c24c
commit
1925d32c40
2
src/ls.c
2
src/ls.c
@ -380,7 +380,7 @@ static int ls_files(int argc, char **argv, const struct winsize w) {
|
|||||||
if (S_ISDIR(sb.st_mode))
|
if (S_ISDIR(sb.st_mode))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
struct d_node **tmp = realloc(file, sizeof(struct d_node *) * (files + 2));
|
struct d_node **tmp = realloc(file, sizeof(struct d_node *) * (files + 1));
|
||||||
if (tmp == NULL) {
|
if (tmp == NULL) {
|
||||||
dfree(file, files);
|
dfree(file, files);
|
||||||
argv[i] = NULL;
|
argv[i] = NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user