From 7e43a45c8a05b9359bc468031d268ef23f1c21a4 Mon Sep 17 00:00:00 2001 From: Allen Webster Date: Sat, 9 May 2020 15:18:50 -0700 Subject: [PATCH] Tracking down a linux bug that forces me to work on Windows ... --- platform_linux/linux_4ed_functions.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/platform_linux/linux_4ed_functions.cpp b/platform_linux/linux_4ed_functions.cpp index 58f781ba..d63b71d1 100644 --- a/platform_linux/linux_4ed_functions.cpp +++ b/platform_linux/linux_4ed_functions.cpp @@ -128,7 +128,7 @@ system_get_file_list(Arena* arena, String_Const_u8 directory){ 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); struct stat st; @@ -147,7 +147,9 @@ system_get_file_list(Arena* arena, String_Const_u8 directory){ if(result.count > 0) { 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; }