diff options
Diffstat (limited to 'src/user/lib/unistd.c')
-rw-r--r-- | src/user/lib/unistd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/user/lib/unistd.c b/src/user/lib/unistd.c index 1a50c3e..ce43551 100644 --- a/src/user/lib/unistd.c +++ b/src/user/lib/unistd.c @@ -163,7 +163,7 @@ size_t absolutepath(char *out, const char *in, size_t size) { if (pos <= size) { pos = path_simplify(out, out, pos); - if (pos > 0) out[pos] = '\0'; + if (pos == 0) return 0; } if (pos + 1 <= size) out[pos] = '\0'; |