summaryrefslogtreecommitdiffstats
path: root/src/b_echo.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-08-05 20:47:12 +0200
committerJozanLeClerc <bousset.rudy@gmail.com>2020-08-05 20:47:12 +0200
commit1105c5c3e7cb945f38fab07d41c6e7fa73327ec8 (patch)
treeba5dba8a9e51ab98baa638639855de19eddb415c /src/b_echo.c
parentFormat fix (diff)
download42-minishell-1105c5c3e7cb945f38fab07d41c6e7fa73327ec8.tar.gz
42-minishell-1105c5c3e7cb945f38fab07d41c6e7fa73327ec8.tar.bz2
42-minishell-1105c5c3e7cb945f38fab07d41c6e7fa73327ec8.tar.xz
42-minishell-1105c5c3e7cb945f38fab07d41c6e7fa73327ec8.tar.zst
42-minishell-1105c5c3e7cb945f38fab07d41c6e7fa73327ec8.zip
Quick fix
Diffstat (limited to '')
-rw-r--r--src/b_echo.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/b_echo.c b/src/b_echo.c
index 7b998d7..ec66049 100644
--- a/src/b_echo.c
+++ b/src/b_echo.c
@@ -93,7 +93,7 @@ uint8_t
str = e_initb(ptr, str);
if (argc >= 1)
{
- if (ft_strncmp(ptr[0], "-n", 2) == 0)
+ if (ft_strncmp(ptr[0], "-n", 3) == 0)
{
nopt = 1;
ptr += 1;
@@ -109,7 +109,7 @@ uint8_t
}
}
}
- free(str);
+ ft_memdel((void*)&str);
if (nopt == 0)
ft_printf("\n");
return (0);