From eb971e65425c705216f2eab2643a7286e3e2b09d Mon Sep 17 00:00:00 2001 From: narnaud Date: Sat, 7 May 2022 01:49:49 +0200 Subject: [PATCH] fix expend str --- utils_2.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/utils_2.c b/utils_2.c index 91282d0..23472eb 100644 --- a/utils_2.c +++ b/utils_2.c @@ -91,9 +91,8 @@ char *expend_str(t_datas *datas, char *line) { if (*line == '$') tmp_i = replace_var(datas, &line, tmp, tmp_i); - tmp[tmp_i] = *line; - line++; - tmp_i++; + else + tmp[tmp_i++] = *(line++); } return (tmp); }