summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'file.c')
-rw-r--r--file.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/file.c b/file.c
index 1d98d6ebe8..e303c3bf6f 100644
--- a/file.c
+++ b/file.c
@@ -1957,9 +1957,9 @@ path_check_1(path)
char buf[MAXPATHLEN+1];
#ifdef HAVE_GETCWD
- if (getcwd(path, sizeof(path)) == 0) return 0;
+ if (getcwd(buf, MAXPATHLEN) == 0) return 0;
#else
- if (getwd(path) == 0) return 0;
+ if (getwd(buf) == 0) return 0;
#endif
strncat(buf, path, MAXPATHLEN);
buf[MAXPATHLEN] = '\0';