diff options
Diffstat (limited to '')
-rw-r--r-- | src/b_cd.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -28,11 +28,11 @@ static void char *args[], t_msh *msh) { - if (!(*path = ft_strdup(*args))) + if ((*path = ft_strdup(*args)) == NULL) { f_alloc_and_destroy_msh(msh); } - if (!ft_strncmp("~/", *path, 2) || !ft_strncmp("~", *path, 2)) + if (ft_strncmp("~/", *path, 2) == 0 || !ft_strncmp("~", *path, 2)) { if (!(*path = ft_strsubst(*path, "~", u_get_var_value("$HOME", msh)))) |