fix a silly crash in ls

This commit is contained in:
K. Lange 2018-05-08 22:39:37 +09:00
parent 5860f11968
commit 0b2d25b243
1 changed files with 2 additions and 0 deletions

View File

@ -341,6 +341,8 @@ static int display_dir(char * p) {
/* Now, copy those entries into an array (for sorting) */
if (!ents_list->length) return 0;
struct tfile ** file_arr = malloc(sizeof(struct tfile *) * ents_list->length);
int index = 0;
foreach(node, ents_list) {