mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
Minor correct for freebsd
This commit is contained in:
@@ -401,8 +401,8 @@ get_current_directory :: proc() -> string {
|
|||||||
// The largest value I could find was 4096, so might as well use the page size.
|
// The largest value I could find was 4096, so might as well use the page size.
|
||||||
page_size := get_page_size();
|
page_size := get_page_size();
|
||||||
buf := make([dynamic]u8, page_size);
|
buf := make([dynamic]u8, page_size);
|
||||||
for {
|
#no_bounds_check for {
|
||||||
cwd := _unix_getcwd(cstring(#no_bounds_check &buf[0]), c.size_t(len(buf)));
|
cwd := _unix_getcwd(cstring(&buf[0]), c.size_t(len(buf)));
|
||||||
if cwd != nil {
|
if cwd != nil {
|
||||||
return string(cwd);
|
return string(cwd);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user