From 27bda16995cf448c77f2a076cd7f662e726b4041 Mon Sep 17 00:00:00 2001 From: y-syo Date: Sun, 21 Jul 2024 15:41:47 +0200 Subject: [PATCH] =?UTF-8?q?=E3=80=8C=F0=9F=94=A8=E3=80=8D=20fix(parsing.en?= =?UTF-8?q?v=5Fvar):=20fixed=20invalid=20get=5Fsize?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/parsing/env_var/get_size_with_env.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/parsing/env_var/get_size_with_env.c b/src/parsing/env_var/get_size_with_env.c index 2b22e2d..0babc93 100644 --- a/src/parsing/env_var/get_size_with_env.c +++ b/src/parsing/env_var/get_size_with_env.c @@ -6,7 +6,7 @@ /* By: adjoly +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/06/06 15:01:19 by adjoly #+# #+# */ -/* Updated: 2024/07/14 19:23:08 by adjoly ### ########.fr */ +/* Updated: 2024/07/21 15:40:01 by mmoussou ### ########.fr */ /* */ /* ************************************************************************** */ @@ -21,15 +21,14 @@ size_t __add_sizeof_dollar(size_t size, char **tmp, t_env *env, char *readline) { char *dollar; - if (**tmp == '$' && **tmp == '?' && \ + if (**tmp == '$' && *(*tmp + 1) == '?' && \ is_inquote(*tmp, *tmp - readline) != SINGLE && \ is_inquote(*tmp, *tmp - readline) != NOT_CLOSED) { *tmp += 2; size++; } - else if (**tmp == '$' && is_inquote(*tmp, *tmp - readline) != SINGLE && \ - is_inquote(*tmp, *tmp - readline) != NOT_CLOSED) + else if (**tmp == '$' && is_inquote(*tmp, *tmp - readline) != SINGLE) { (*tmp)++; size -= strlen_till_notalnum(*tmp);