From 4fee5cefd6c3a1b58698a06a46bc2d25be81ea5b Mon Sep 17 00:00:00 2001 From: BanceDev Date: Mon, 2 Sep 2024 23:13:28 -0400 Subject: fixed crash in cd when no path found --- src/lush.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/lush.c') diff --git a/src/lush.c b/src/lush.c index 0b1c21b..bf5a283 100644 --- a/src/lush.c +++ b/src/lush.c @@ -69,7 +69,7 @@ int lush_cd(lua_State *L, char ***args) { char *exp_path = realpath(path, extended_path); if (!exp_path) { perror("realpath"); - return 0; + return 1; } if (chdir(exp_path) != 0) { perror("lush: cd"); -- cgit v1.2.3-59-g8ed1b