Tracking down a linux bug that forces me to work on Windows ...

master
Allen Webster 2020-05-09 15:18:50 -07:00
parent b81f636795
commit 7e43a45c8a
1 changed files with 4 additions and 2 deletions

View File

@ -128,7 +128,7 @@ system_get_file_list(Arena* arena, String_Const_u8 directory){
continue; continue;
} }
*fip = push_array(arena, File_Info, 1); *fip = push_array_zero(arena, File_Info, 1);
(*fip)->file_name = push_u8_stringf(arena, "%.*s", d->d_reclen, name); (*fip)->file_name = push_u8_stringf(arena, "%.*s", d->d_reclen, name);
struct stat st; struct stat st;
@ -147,7 +147,9 @@ system_get_file_list(Arena* arena, String_Const_u8 directory){
if(result.count > 0) { if(result.count > 0) {
result.infos = fip = push_array(arena, File_Info*, result.count); result.infos = fip = push_array(arena, File_Info*, result.count);
for(File_Info* f = head; f; f = f->next) { for(File_Info* f = head;
f != 0;
f = f->next) {
*fip++ = f; *fip++ = f;
} }