summaryrefslogtreecommitdiff
path: root/libstd/getcwd.myr
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2015-04-14 17:33:24 -0700
committerOri Bernstein <ori@eigenstate.org>2015-04-14 17:33:24 -0700
commitf366166b75c22f674c6b8b5129cdf127608acc81 (patch)
tree90a12b527ab31979847b7e5e50d5ee92b98ee6d1 /libstd/getcwd.myr
parent68dc8fd88d1fc23d6b882531343b38a8e2c7ac99 (diff)
downloadmc-f366166b75c22f674c6b8b5129cdf127608acc81.tar.gz
Get a more or less working getcwd under OSX.
TODO: It still truncates long paths.
Diffstat (limited to 'libstd/getcwd.myr')
-rw-r--r--libstd/getcwd.myr2
1 files changed, 1 insertions, 1 deletions
diff --git a/libstd/getcwd.myr b/libstd/getcwd.myr
index 3e9bb03..4c53bb2 100644
--- a/libstd/getcwd.myr
+++ b/libstd/getcwd.myr
@@ -17,7 +17,7 @@ const getcwd = {
n = bgetcwd(buf)
if n >= 0
/* n is the length of the nul terminated c string */
- -> buf[:n-1]
+ -> buf[:n]
elif n != Erange
std.slfree(buf)
-> ""