fix: brain ain't braining at 6am (more win32 get_cwd fixes)

This commit is contained in:
MechSlayer 2025-09-11 06:24:45 +02:00
parent c51434d3ae
commit 4c4eb7e620

View file

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