From c20189602db87e3a039890525c837a0c06429c0a Mon Sep 17 00:00:00 2001 From: polymonster Date: Sun, 5 Nov 2023 16:23:18 +0000 Subject: [PATCH] - memset stat to 0 for getmtime to allow mtime == 0 for checking file exists --- core/pen/source/posix/file_system.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/core/pen/source/posix/file_system.cpp b/core/pen/source/posix/file_system.cpp index 869e8921..e6367986 100644 --- a/core/pen/source/posix/file_system.cpp +++ b/core/pen/source/posix/file_system.cpp @@ -291,6 +291,7 @@ namespace pen pen_error filesystem_getmtime(const c8* filename, u32& mtime_out) { struct stat stat_res; + memset(&stat_res, 0x0, sizeof(stat_res)); stat(filename, &stat_res);