From d8fcf51d92039f8edfffafada18f78b047afae8f Mon Sep 17 00:00:00 2001 From: Jakob Kaivo Date: Sat, 1 Apr 2023 20:58:40 -0400 Subject: temporarily hack so "cd .." works --- cd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cd.c b/cd.c index 29aba49..a494901 100644 --- a/cd.c +++ b/cd.c @@ -49,7 +49,8 @@ static void cd_in_cdpath(size_t n, char p[]) static void cd_make_canonical(char *path) { - char tmp[strlen(path)]; + char tmp[strlen(path) + 1]; + strcpy(tmp, path); /* TODO */ -- cgit v1.2.1