fix: brain ain't braining at 6am (more win32 get_cwd fixes)
This commit is contained in:
parent
c51434d3ae
commit
4c4eb7e620
1 changed files with 3 additions and 1 deletions
|
|
@ -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
|
*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()
|
DRANG_END_TRY_IGNORE()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue