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() }