diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-09-19 16:09:41 +0200 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-09-19 16:09:41 +0200 |
commit | 0ec82dde60df71de23eb553165b40c7407900c8d (patch) | |
tree | 6ed20638bfef446ef059cb433070eb22a9f0df29 /src/s_init.c | |
parent | Prompt stuff (diff) | |
download | 42-minishell-0ec82dde60df71de23eb553165b40c7407900c8d.tar.gz 42-minishell-0ec82dde60df71de23eb553165b40c7407900c8d.tar.bz2 42-minishell-0ec82dde60df71de23eb553165b40c7407900c8d.tar.xz 42-minishell-0ec82dde60df71de23eb553165b40c7407900c8d.tar.zst 42-minishell-0ec82dde60df71de23eb553165b40c7407900c8d.zip |
qweqwe
Diffstat (limited to 'src/s_init.c')
-rw-r--r-- | src/s_init.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/s_init.c b/src/s_init.c index f8037b9..7d2b656 100644 --- a/src/s_init.c +++ b/src/s_init.c @@ -109,7 +109,7 @@ static void { char fmt[8]; char tmp[255]; - char *str; + char str[255]; int32_t shlvl; u_get_var_value(tmp, "$SHLVL", 255, msh); @@ -125,9 +125,8 @@ static void f_shlvl_too_high(shlvl); shlvl = (shlvl >= 999) ? 0 : shlvl; shlvl = (shlvl < 0) ? 0 : shlvl + 1; - str = ft_itoa(shlvl); + ft_itoa_s(str, shlvl); u_subst_var_value("$SHLVL", str, msh); - ft_memdel((void*)&str); } } |