From 4c4eb7e620d380eb4705fa896168181d13f035df Mon Sep 17 00:00:00 2001 From: MechSlayer <0jcrespo1996@gmail.com> Date: Thu, 11 Sep 2025 06:24:45 +0200 Subject: [PATCH] fix: brain ain't braining at 6am (more win32 get_cwd fixes) --- Source/DrangPlatform/Source/win32/fs/dir.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Source/DrangPlatform/Source/win32/fs/dir.c b/Source/DrangPlatform/Source/win32/fs/dir.c index 2a3fcfb..3b2986e 100644 --- a/Source/DrangPlatform/Source/win32/fs/dir.c +++ b/Source/DrangPlatform/Source/win32/fs/dir.c @@ -135,7 +135,9 @@ int drang_fs_get_cwd(char *buffer, size_t size, size_t *out_size) *out_size = length > size ? length - 1 : length; // Exclude null terminator if the buffer is too small } - DRANG_CHECK(buffer != NULL && length < size, DRANG_ENOMEM); + if (buffer != NULL) { + DRANG_CHECK(length < size, DRANG_ENOMEM); + } DRANG_END_TRY_IGNORE() }