aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pk/syscall.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pk/syscall.c b/pk/syscall.c
index b47c237..03eee27 100644
--- a/pk/syscall.c
+++ b/pk/syscall.c
@@ -420,7 +420,7 @@ long sys_getcwd(char* buf, size_t size)
{
char kbuf[MAX_BUF];
long ret = frontend_syscall(SYS_getcwd, kva2pa(kbuf), MIN(size, MAX_BUF), 0, 0, 0, 0, 0);
- if (ret == 0)
+ if (ret > 0)
memcpy_to_user(buf, kbuf, strlen(kbuf) + 1);
return ret;
}